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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

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