Advertisement

07.18.2008 at 07:56AM PDT, ID: 23577047 | Points: 500
[x]
Attachment Details

DreamWeaver CS3 - templates and library items: hilighting the currently selected web page

Asked by tomaugerdotcom in Macromedia Dreamweaver, Cascading Style Sheets (CSS), Hypertext Markup Language (HTML)

Tags: , , ,

This is an advanced template / library items question. We're looking for a best practice.

Given the following type of menu structure:
<ul>
  <li>Menu 1
    <ul>
      <li>Submenu 1</li>
    </ul>
  </li>
  <li>Menu 2</li
</ul>

We would like to put this menu structure into a Library item for inclusion on a variety of Templates. So far so good.

The catch is that we would like to be able to hilight (change the style) of the currently selected menu item - this will be different for each page (the menu item is the website's navigation menu, so each menu item corresponds to a different webpage).

Each webpage is an instance of the .dwt which contains the library item UL menu structure. The problem we're running into is that you cannot work with variables within a library item (or can you?), so we're debating some options about how to set the style of the currently selected menu item in the most efficient way.

What are your best practices? Our objective is to limit the amount of per-page editing required, not "break" the Library item or template functionality (let's not even discuss the option of opening up the html in Notepad or something that doesn't respect the read-only template or library sections), and find the easiest way to be able to update this menu structure in (preferably) just one document (the library item) whenever a new page or section is added to the site.

And yes, SSI or CF or PHP would be wonderful, but that's not an option. I'm also wary of JavaScript because we want this to be as compatible as possible, including handheld and mobile devices, so a complete JS menu is out of the question.

A tall order? perhaps. Has anyone been down this road before? Please share your experiences.

Thanks in advance, Experts!

TomStart Free Trial
[+][-]07.19.2008 at 12:18PM PDT, ID: 22043423

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 01:06PM PDT, ID: 22043546

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]07.19.2008 at 04:30PM PDT, ID: 22043924

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628