Jump to:

3460 Posts in 1064 Topics by 739 members

Data Model Questions

SilverStripe Forums » Data Model Questions » Site-wide message

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1
Go to End
Author Topic: 341 Views
  • SilverStripeBill
    Community Member
    3 Posts

    Site-wide message Link to this post

    I'm trying to figure out how to create an editable field that holds a Site-wide message ex: "Welcome to our site" that displays on every page. I want to be able to edit the field in one place and update every page with the new message without changing any code after it's working. Even if I stuck that field on some random page, I still don't know how to access the fields of one page from a different page, especially if the pages are not direct siblings or descendants. The kind of information I would need to build a menu would probably be useful to find out how to build this site-wide message.

    Can someone point me in the right direction?

    Edit: I've discoverd Menu(1), Children and ChildrenOf() controls

    Is there a page that lists all the default controls/functions that can be used in a template?

  • zenmonkey
    Community Member
    528 Posts

    Re: Site-wide message Link to this post

    There was a page for 2.4, but so far it hasn't been updated for 3. Most should still work though. http://doc.silverstripe.com/framework/en/2.4/reference/built-in-page-controls

    As for site wide stuff, I usually use a custom site config. By default I always add the basic contact info there as wells as a default email for form submissions. In the the template it can be accessed from $SiteConfig.YourProperty

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.