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.

Template Questions /

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

Changing the layout for just the ForumMemberProfile pages


Go to End


1550 Views

Avatar
HansR

Community Member, 141 Posts

17 February 2009 at 6:49pm

Edited: 17/02/2009 6:52pm

I want to remove the sidebar for just the forum pages. I managed to do this for the actual forum pages using the InSection() property:

<% if InSection(forums) %>

However, for the ForumMemberProfile pages nothing that I do seems to work, I've tried using InSection and ClassName and neither will recognize that it's in the ForumMemberProfile section. I'm guessing that the problem is caused by ForumMemberProfile being a child-class of Page_Controller instead of Page, and there is no associated Page child-class.

Any ideas on how to perform an if/else in a template that detects when it's on a ForumMemberProfile page?