I have a question regarding the syntax of $ClassName page controls.
My page structure is like this:
(templates)
Page.ss
(Layout)
Page.ss
HolderPage.ss
(Includes)
Sidebar.ss <-this is where my page navigation is located. This template is included on both Layouts
The "HolderPage," unlike a regular "Page," has children. When a visitor is on the HolderPage I want to display navigation for all children. This is easy.
In my templates/Includes/sidebar.ss:
<% if $ClassName=HolderPage %> ...navigation for child pages... <% end_if %>
Whenever a visitor is on a HolderPage they see the navigation for the child pages.
However, I want the navigation to be displayed when a user is also on a child page of the HolderPage, as well. I want something like this:
<% if $ClassName=HolderPage || $Parent.ClassName=HolderPage %>
But that doesn't seem to work, nor any variation that I can come up with. Can someone tell me if there is syntax to do this. Or do I have to make a completely separate HolderPage template with a custom sidebar for just that page? That seems like a long-form way of doing this.
Thanks!
Chris