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'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.

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   981 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