Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2007-05-07 00:36:55
- scdoody
- Member
- Registered: 2006-10-18
- Posts: 129
Changing order of sections in a list
I have a section list for navigation – but, I want to change the order the sections are listed in – currently they are listed in alphabetical order:
<txp:section_list active_class=“globalnav-on” break=“li” class=“globalnav” include_default=“0” wraptag=“ul” />
Also, this code generates:
<ul class=“globalnav”>
<li>secton a</li>
<li>secton b</li>
<li>secton c</li>
<li>secton d</li>
</ul>
But – I want to be able to add onmouseover and onmouseout events to the li elements in order to change the color of the background of the li on rollover – how would I do this. I know the CSS, I just need to know where to add this to the above textpattern code.
Thanks!!!
Offline
Re: Changing order of sections in a list
You don’t have to do anything to the html. Just use the “hover” selector in the CSS like this…
globalnav li a{
background:red;
}
globalnav li a:hover{
background:blue;
}
You can also designate different strings for section “name” and “title” to affect sort order. like this…
- Section names “01-home”, “02-about”
- Section titles “home”, “about”
This will make “home” display before “about”.
Last edited by mrdale (2007-05-07 06:30:46)
Offline
Re: Changing order of sections in a list
mrdale wrote:
You can also designate different strings for section “name” and “title” to affect sort order. like this…
Section names “01-home”, “02-about”
Section titles “home”, “about”
Nice Tip! Thanks Dale.
Cheers,
Tom
Offline