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:

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