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, biapar, Willr, Ingo, swaiba, simon_w

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


Reply


3 Posts   649 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, 5513 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