Remember me? forgot password | register

SilverStripe Forum

4683 Posts in 1048 Topics by 664 members

Jump to:

Extending and hacking

If this is your first visit, you will need to register before you can post. However, you can browse all messages below.

Community » SilverStripe Forum » Extending and hacking » the future of widgets
Page: 1 go to end Reply
Author Topic: the future of widgets 722 views
  • Nicolaas
    avatar
    Community Member
    133 posts
    18 SilverStripe Sites

    the future of widgets Link to this post

    Hi Silverstripers

    Widgets are a fantastic idea, but in the documentation they are listed as if the widgets were part of the blog module perse. In the documentation, I have added a section "how to add widgets to other pages": http://doc.silverstripe.com/doku.php?id=widgets#adding_widgets_to_other_pages

    What is the philosophy on widgets - should all loaded widgets be available to all pages - or should widgets only be available to blog holders or ....?

    For me, I would like to see the following:

    Class MyPage extends Page {

    static include_widgets = Array(
    "mywidget1",
    "mywidget2",
    }
    }

    Cheers

    Nicolaas

  • asfahaan
    avatar
    Community Member
    6 posts

    Re: the future of widgets Link to this post

    Hi Thanks for this!

    I was looking for a solution to add widgets to normal pages other than Blog!

    Can you please tell me which file iam suppose to change "class Page extends SiteTree {}"?

    Cheers,
    Asfahaan

  • willr
    avatar
    Core Development Team
    1263 posts
    3 SilverStripe Sites 2 SilverStripe Themes

    Re: the future of widgets Link to this post

    class Page extends SiteTree {}

    that would be the Page.php file in your code. Each class has its own File and all the code for your site is located within mysite/code

    722 views
go to top Reply

Currently Online:

François, patrics

Welcome to our latest member: patrics