Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » InSection

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 1386 Views
  • gakenny
    Avatar
    Community Member
    153 Posts

    InSection Link to this post

    Hello,

    Can someone shed a little bit of light on this function:
    <% if InSection(page-url) %>

    Most importantly, what format does page-url take and does it need to be contained in quotes? I am struggling to get this to work but what I am trying to achieve is to identify whether the current page is under the hierarchy of the specified page-url.

    Cheers,

    Gary

  • gakenny
    Avatar
    Community Member
    153 Posts

    Re: InSection Link to this post

    Hello,

    Is there any documentation for this function?

    Cheers,

    Gary

  • dio5
    Avatar
    Community Member
    501 Posts

    Re: InSection Link to this post

    I think it expects the urlsegment without quotes.

    So like:

    InSection(about)

    InSection(this-is-the-page-url)

    Correct me if I'm wrong.

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