Jump to:

23479 Posts in 18951 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How to use <% control Page(my page) %>

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

Page: 1
Go to End
Author Topic: 624 Views
  • Happysadhu
    Avatar
    Community Member
    33 Posts

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

    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

  • Willr
    Avatar
    Forum Moderator
    5502 Posts

    Re: How to use <% control Page(my page) %> Link to this post

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

  • Happysadhu
    Avatar
    Community Member
    33 Posts

    Re: How to use <% control Page(my page) %> Link to this post

    Hi,
    Thanks for your quick response. It worked!

    Sam

    624 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.