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.

Archive /

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

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

InSection


Go to End


3 Posts   1692 Views

Avatar
gakenny

Community Member, 153 Posts

4 December 2007 at 11:27pm

Edited: 04/12/2007 11:27pm

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

Avatar
gakenny

Community Member, 153 Posts

7 December 2007 at 11:53pm

Hello,

Is there any documentation for this function?

Cheers,

Gary

Avatar
dio5

Community Member, 501 Posts

8 December 2007 at 1:22pm

I think it expects the urlsegment without quotes.

So like:

InSection(about)

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

Correct me if I'm wrong.