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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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

How to use <% control Page(my page) %>


Go to End


3 Posts   839 Views

Avatar
Happysadhu

Community Member, 33 Posts

28 July 2009 at 12:22pm

Hi,
I'm trying to retrieve the $Title of my ArticleHolder page to display on my homepage using...

<% control Page(ArticleHolder) %><h3>$Title</h3><% end_control %>

But I'm getting no output - nothing.

Any ideas anyone,
Sam

Avatar
Willr

Forum Moderator, 5523 Posts

28 July 2009 at 9:14pm

<% control Page() %> requires the URL Segment of the page, not the classname. So you would use it as <% control Page(articles) %> if your ArticleHolder page has the urlsegment 'articles'

Avatar
Happysadhu

Community Member, 33 Posts

29 July 2009 at 3:43am

Hi,
Thanks for your quick response. It worked!

Sam