_listItem active state

24 posts by 2 authors in: Forums > CMS Builder
Last Post: May 25, 2010   (RSS)

By dsternalski - May 18, 2010

Hi,

I've done this, but it still doesn't work. Now, the a class is constantly showing.

Re: [dsternalski] _listItem active state

By Jason - May 18, 2010

Hi,

You may want to code the style directly into the <a> tag the same way we were doing it with the <span> tag. That should work.

Let me know.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By dsternalski - May 18, 2010

Hi,

I've tried this and the active state stays active throughout, just like the first set of code.

Re: [dsternalski] _listItem active state

By Jason - May 18, 2010

Hi,

Could you attach the .php file you're working with, and send a link to an example page so I can see what's happening?

Thanks.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By dsternalski - May 18, 2010

Please find attached the PHP, CSS and a screen print (as this is on a dev server).

Please note that the jpg is of the News Page, not the Curriculum page.

By dsternalski - May 19, 2010

Hi,

Thank you!

I changed the code a bit and got the top level navigation to stay highlighted when in that set, however, I am now unable to see my hover / rollover second nav work when the top nav is selected.

This is now my code:

<?php foreach ($allCurriculumRecords as $categoryRecord): ?>
<?php if(!$categoryRecord['featureSelect']) : ?>
<?php echo $categoryRecord['_listItemStart']; ?>
<li class="currentpage"><a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a></li>
<?php else: ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>
<?php endif ?>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endif ?>
<?php endforeach; ?>

Re: [dsternalski] _listItem active state

By Jason - May 19, 2010

Hi,

Navigation links that are not selected are currently being displayed without any css:
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>

If you create a css class for this and add it to the line above, that should take care of the problem for you.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/

By dsternalski - May 20, 2010

Hi Sorry,

I missed out a line from the code that I updated:

<?php foreach ($allCurriculumRecords as $categoryRecord): ?>
<?php if(!$categoryRecord['featureSelect']) : ?>
<?php echo $categoryRecord['_listItemStart']; ?>
<?php if($thisPage=="curriculum"): ?>
<li class="currentpage"><a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a></li>
<?php else: ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>
<?php endif ?>
<?php echo $categoryRecord['_listItemEnd'] ?>
<?php endif ?>
<?php endforeach; ?>

Re: [dsternalski] _listItem active state

By Jason - May 20, 2010

Hi,

There is no class specified for the <a> tags that appear under <?php else: ?>
<?php else: ?>
<a href="<?php echo $categoryRecord['_link'] ?>"><?php echo $categoryRecord['name'] ?></a>


If you specify a CSS class for this and add it to the code, it should work.

Give that a try.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/