21287 Posts in 5733 Topics by 2602 members
|
Page:
1
|
Go to End | |
| Author | Topic: | 396 Views |
-
Built in page controls

23 January 2012 at 7:39am
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 LayoutsThe "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 -
Re: Built in page controls

23 January 2012 at 10:55am
The menu(2) control sounds like it would work for you.
<% if Menu(2) %>
<ul id="Menu2">
<% control Menu(2) %>
<li class="$LinkingMode"><a href="$Link" title="Go to the "{$Title}" page">$MenuTitle</a></li>
<% end_control %>
</ul>
<% end_if %>Taken from Building a basic site.
-
Re: Built in page controls

24 January 2012 at 8:46am Last edited: 24 January 2012 8:46am
Hi, Sticks,
I was hoping to be more specific than just using Menu(2). My intention was to make more than one type of holder page, but use the same sidebar.ss for all holder pages and sub pages, and not show links on some of those pages.It's looking like my best bet is to use the Menu(2) option in conjunction with 'ShowInMenus' => false for some of these pages.
Thanks for your reply!
| 396 Views | ||
|
Page:
1
|
Go to Top |


