In another CMS that I use it's possible to request the content of a field on a page. For example, if I had a quote of the day field on the homepage, in another template If I wanted that quote to show up as well I could just refer to the quote field of the homepage. What's the best way to handle this type of content re-use in SilverStripe?
We've moved the forum!
Please use forum.silverstripe.org for any new questions
(announcement).
The forum archive will stick around, but will be read only.
You can also use our Slack channel
or StackOverflow to ask for help.
Check out our community overview for more options to contribute.
Yes you can .... ;)
Have a look at this page :
http://doc.silverstripe.com/doku.php?id=built-in-page-controls&s=page%20controls
You can do something like :
<% control Page('URLSegment') %>
$YourField
<% end_control %>
Hey thanks a lot for this valuable info! It looks like exactly what I need. I'll go study up on it.Have a good one!
For example:
<% control Page(home) %>
<ul id="portfolio">
<li>
<img src="$BannerImage1.PageBanner.URL" alt="Header Image" />
</li>
</ul>
<% end_control %>
In other page, you use Image data of "home" page.