I see that I work on this more, I have troubles beyond the
stated problem with the current attribute. This is a drop-down
menu. I've attached the xml I'm working with, the script,and the
html output I'm trying to reproduce. I think the problem is in my
use of a count for numbering elements in the menus. I'm finding
setting a a count then increasing it by count + 1, yields 0, 01,
for 1, 2, 3, 4, etc.
This is cleaner, I agree. Still I'm coming out with class="" as though it's not recognizing the current page.
From: Charlie Holder [[email blocked]]
Sent: Friday, May 04, 2012 9:55 AM
To: Steele, James
Subject: Re: trouble catching current page [Velocity Formats]
I don't think your <menu> nodes will have the
current='true' attribute ever. Looks like you're using
a structured method for creating the navigation and including it
through a chooser. Is that correct?
You'll want to compare the
calling-page/system-page/link with each
menu/toplink/link as you loop through. That should do
set this up.
I set up the drop-down menu as a data-defined block.
In the page data-definition, I included a block-chooser.
I've selected the drop-down block on the page.
If I take the html produced by the format and paste it into the
default region wysiwyg, it works but not where the block is placed
on the page.
You can see the index page with my script running at http://www.wit.edu/_temp/cpce/
If you click any of the menu headings they're all linked to a
cpce-page.html that has the working hard-coded script in it.