Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-10-18 05:27:23
- nasv
- Member
- Registered: 2005-11-14
- Posts: 22
txp:section_list active_class attribute ineffective?
www.tintorecords.com/About
I am on production 4.0.4 r1956
My apologies if this has been addressed before, my search did not generate the exact relevant results I was looking for.
I am using txp:section_list tag to manage my navigation items for a side bar. I want to take advantage of a specific class assigned by the current active section (for example make the “About” list item bold when I am in the About section). This is the txp:section_list tag that I had generated:
<code>
<txp:section_list active_class=“active_nav_item” break=“li” class=“section_list” default_title=“Home” include_default=“1” label=“Be creative” labeltag=“h3” sections=“News, Studio, Productions, Tintos, About” wraptag=“ul” />
</code>
My problem is that the active_class is NOT being applied. When I view the source from my IE6 browser, the following is generated:
<code>
<ul class=“section_list”>
<li><a href=“http://www.tintorecords.com/”>Home</a></li>
<li><a href=“http://www.tintorecords.com/News/”>News</a></li>
<li><a href=“http://www.tintorecords.com/Studio/”>Studio</a></li>
<li><a href=“http://www.tintorecords.com/Productions/”>Productions</a></li>
<li><a href=“http://www.tintorecords.com/Tintos/”>Tintos</a></li>
<li><a href=“http://www.tintorecords.com/About/”>About</a></li>
</ul>
</code>
As you can see, the “section_list” class is accounted for, but no where is my active_class “active_nav_item”! FYI, my current new CSS that I am testing is only live on my Studio, Productions, and About sections; however, in a quick test to see if the active_class was applied on the homepage, the class attribute actually did appear for the “Home” list item. The only thing I can see so far between the “default” section and the remainder of my sections is that the remainder of my sections are capitalized, but I find this difference to be a doubtful cause.
So, why is my active_class not being applied to this implementation that I find to be very simple?
Thanks,
-Nico
Offline
#2 2006-10-18 05:43:32
- nasv
- Member
- Registered: 2005-11-14
- Posts: 22
Re: txp:section_list active_class attribute ineffective?
So, after a bit more meddling, I changed the Section Names to all lowercase and retained my capitalization in the Section Title. This workaround is successful, and I can still display the sections how I please, but it is puzzling to me why it has to be lowercase to work.
Any input or explanation, out of curiosity?
thanks,
-Nico
Offline
Re: txp:section_list active_class attribute ineffective?
Section name= the name of the section, appears as http://site.com/section-name/
Section title = the title of the section, appears in the page title, txp:section and other places. Not related to the URL.
With <txp:section_list />
, the sections
attribute asks for the section names.
Offline
#4 2006-10-18 15:30:55
- nasv
- Member
- Registered: 2005-11-14
- Posts: 22
Re: txp:section_list active_class attribute ineffective?
Hi Jm, thanks for the reply, but I am aware of the distinction between section name and section title. My question/confusion is that the active_class attribute is not working correctly in the txp:section_list tag if the actual section name contains a capital letter. I do know how section name will affect URLs, and that I can make the section title appear by editing section-title… I’m just wondering why the active_class attribute doesn’t tie to an active section (well, more generally a list item) if that section name (list item) contains CAPS.
-Nico
Offline
Re: txp:section_list active_class attribute ineffective?
I’m trying to change from a section list that includes all sections (see list tag I’m using now below) to a tag that will show only the pages within a specific section (e.g.: “Services” section).
<txp:section_list default_title=’<txp:text item=“home” />’ include_default=“1” wraptag=“ul” break=“li”>
<txp:if_section name=’<txp:section />’>»</txp:if_section>
<txp:section link=“1” title=“1” />
<txp:if_section name=’<txp:section />’>
<txp:article_custom section=’<txp:section />’ wraptag=“ul” break=“li”>
<txp:if_article_id>›</txp:if_article_id>
<txp:permlink><txp:title /></txp:permlink>
</txp:article_custom>
</txp:if_section>
</txp:section_list>
Any help out there would be appreciated.
Living the Location-Independent Life: www.NuNomad.com
Offline
#6 2011-04-12 21:36:48
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: txp:section_list active_class attribute ineffective?
Hi laptophobo, I must ask you once again: please start a new topic! Your question is not related to this thread’s subject, so it probably won’t get the attention it needs. In general it is not recommended to post in a four and a half year old forum thread anyway…
Offline
Re: txp:section_list active_class attribute ineffective?
I really thought that was a related topic page. Sorry. So if it’s not related to “txp section list” what might you recommend?
Thanks for the nudge.
Living the Location-Independent Life: www.NuNomad.com
Offline
Re: txp:section_list active_class attribute ineffective?
The topic is not section_list
in general, as one can see simply by reading the subject line: it’s about the active_class
attribute in section_list
. Feel free to post a new topic (as Els has already recommended). You’re right to look for an existing topic first; you wouldn’t want to re-hash an FAQ or a problem that’s already been solved. Otherwise it’s better to start a new topic; the forum is a much better resource if each topic stays focused.
Code is topiary
Offline
Re: txp:section_list active_class attribute ineffective?
Thanks Jeff (and Els),
I’ve posted the new topic in How do I > “Creating a sectional navigation?”
Living the Location-Independent Life: www.NuNomad.com
Offline
#10 2011-04-13 17:27:27
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: txp:section_list active_class attribute ineffective?
Thank you! :)
Offline