Thread tagged as: Question, Problem, Suggestions

can't figure out how to style subpage navigation links differently to ancestor p...

The site that I'm working on has some static navigation and some that should be generated dynamically, using perch admin but I can't figure out how to style it in the way that the html pages display: Here is the html navigation markup:

<aside class="portletNav" role="navigation">
<ul class="portletNavBlk">
<li class="portletNavLink"><a href="#">About our Congregation</a></li>
<li class="portletNavLink"><a href="#">About Unitarian Universalism</a></li>
<li class="portletNavLink"><a href="#">Membership</a>
<ul class="subPortletNavBlk">
<li class="subPortletNavLnk"><a href="#">Steps to Membership</a></li>
<li class="subPortletNavLnk"><a href="#">Pledging</a></li>
<li class="subPortletNavLnk"><a href="#">Governing Docs</a></li>
<li class="subPortletNavLnk"><a href="#">Members Page</a></li>
<li class="portletNavLink"><a href="#">Our Campus</a></li>
<li class="portletNavLink"></li>

In my template page (master page), I used this template:

<aside class="portletNav" role="navigation">
perch_pages_navigation( array(
'from-path' => '/What-We-Do',
'levels' => 2,
'hide-extensions' => false,
'hide-default-doc' => true,
'flat' => false,
'template' => 'portletNav-IntrnlPg.html',
'include-parent' => 'true',
'use-attributes' => 'true'

) );

The 'portletNav-IntrnlPg.html' template is identical to the 'item.html' navigation template. Which I'm attempting to style each nav item using direct-child style syntax as per (since I can't figure out how I might use the classes specific to subnav items):

.portletNav > ul {
.portletNav > ul > li {

.portletNav > ul > li a{
.portletNav > ul > ul > li{
.portletNav > ul > ul > li a {

.portletNav > ul > ul > li a:link{

...etc. This CSS works with the html page (is demo-ed in link above) but doesn't work with Perch. I'm scouring the documents and forum but haven't found anything that goes to the heart of this issue yet. Thanks for your suggestions. p.s. I'm not great with php syntax, so would really appreciate layman's language ....

Austin Holmes

Austin Holmes 0 points

  • 2 years ago
Drew McLellan

Drew McLellan 2638 points
Perch Support

What's the difference between the static version of the HTML and the output from Perch?

ios man

ios man 0 points

Hi after reading your blog I have finally found some knowledge which I was looking for so long for that reason Thanks.