Jump to:

5093 Posts in 1516 Topics by 1113 members

Customising the CMS

SilverStripe Forums » Customising the CMS » Persistant Widget Content Across Multiple Pages

Moderators: martimiz, Howard, Sean, Ryan M., biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 1397 Views
  • Anonymous user
    Avatar
    Community Member
    1 Post

    Persistant Widget Content Across Multiple Pages Link to this post

    Hi All,
    I'm creating a site that uses some sidebar content that is well suited for widgets (short lists, links, bits of text, etc). However, while the content needs to be editable (like the HtmlContentWidget), many pages would share the exact same content.

    What I'd like to do is specify the content once in the CMS, and have all instances of the widget across multiple pages reflect the change. I'd almost call it a "Global Widget". Does this make sense? Any ideas or pointers would be much appreciated.

  • basm
    Avatar
    Community Member
    1 Post

    Re: Persistant Widget Content Across Multiple Pages Link to this post

    Hi,

    I am having exactly the same problem. Is there a way to have "global content" in silverstripe? I haven't seen any widget or module that can access data from a different page.
    Have you had more success?

    Greetings,

    bas

  • Anonymous user
    Avatar
    Community Member
    1 Post

    Re: Persistant Widget Content Across Multiple Pages Link to this post

    Basm,
    I wasn't finding a good solution to the problem, so I wrote a widget to do exactly that. I've attached it to this post (Ask and ye shall receive!). It will pull the content from any page on your site. For example, you could make a "Contact Us" page, install this widget on three different pages, point each instance to "Contact Us", and they would all share the same info. Makes updating easy.

    I actually submitted the widget to this site months ago, but It fell into a void, and I never heard from any site admins.

    *******If you are a site admin reading this, please approve my widget to help this problem *******

    As a note, I haven't tried it on the most recent version of SS, so if you run into any problems, let me know.

    -Peter

    Edit: There are two files attached. Use the one titled "PageContent2". I tried deleting the first, doesn't seem to work.

    Attached Files
    1397 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.