Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation
 
PerlMonks  

Re: Thoughts on converting from HTML::Template to Template Toolkit

by idsfa (Vicar)
on Mar 22, 2006 at 23:29 UTC ( #538627=note: print w/ replies, xml ) Need Help??


in reply to Thoughts on converting from HTML::Template to Template Toolkit

You are not thinking about your issue with the navigation bar correctly. You do not need to add certain sub-items depending upon the current page. You need to hide certain sub-items. Plain HTML/CSS example:

<style type="text/css"> ul li ul {display:none;} #active ul {display:block;} </style> <ul> <li id="active">Section 1 <ul> <li>Subsection 1.1</li> <li>Subsection 1.2</li> </ul> </li> <li>Section 2 <ul> <li>Subsection 2.1</li> <li>Subsection 2.2</li> </ul> </li> </ul>

Renders as:

  • Section 1
    • Subsection 1.1
    • Subsection 1.2
  • Section 2

Even though this contains both submenus, only the first one gets displayed. Without knowing exactly what the generated HTML of you navbar looks like, I can only point to the general technique ...


The intelligent reader will judge for himself. Without examining the facts fully and fairly, there is no way of knowing whether vox populi is really vox dei, or merely vox asinorum. — Cyrus H. Gordon


Comment on Re: Thoughts on converting from HTML::Template to Template Toolkit
Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://538627]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others cooling their heels in the Monastery: (3)
As of 2014-10-02 06:12 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    What is your favourite meta-syntactic variable name?














    Results (49 votes), past polls