Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

Re-Using content of a field added to a page type

Go to End

4 Posts   953 Views


Community Member, 19 Posts

21 March 2009 at 1:37am

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?


Community Member, 787 Posts

21 March 2009 at 1:48am

Yes you can .... ;)

Have a look at this page :

You can do something like :

<% control Page('URLSegment') %>
<% end_control %>


Community Member, 19 Posts

22 March 2009 at 5:44pm

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!


Forum Moderator, 435 Posts

4 September 2009 at 12:14am

For example:

<% control Page(home) %>
<ul id="portfolio">
<img src="$BannerImage1.PageBanner.URL" alt="Header Image" />

<% end_control %>

In other page, you use Image data of "home" page.