Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-04-30 19:00:58

Dancul75
New Member
Registered: 2007-04-30
Posts: 4

active_class doesn't appear for each section in <li> list

I’m using active_class as recommended but it works only for first item <li>. When I click to other section the tag is missing.

<txp:section_list active_class=“here” default_title=“Home” include_default=“1” break=“li” wraptag=“ul” />

On the home page it looks as supposed to look:
<li><a class=“here” href”…
<li><a href=”…

but on the other pages it’s clean list like:
<li><a href=…
<li><a href=…

Did I miss set up something?
Thank you for any hint.

Dancul

Offline

#2 2007-04-30 19:03:50

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: active_class doesn't appear for each section in <li> list

Do you use different page templates for your sections? If so, did you place exactly the same tag in all templates?

Offline

#3 2007-04-30 19:35:35

Dancul75
New Member
Registered: 2007-04-30
Posts: 4

Re: active_class doesn't appear for each section in <li> list

Els wrote:

Do you use different page templates for your sections? If so, did you place exactly the same tag in all templates?

I do, the default one only. I tried to delete cookies, all offline content from disc, restart the browser… any luck.

Offline

#4 2007-04-30 20:20:20

Mary
Sock Enthusiast
Registered: 2004-06-27
Posts: 6,236

Re: active_class doesn't appear for each section in <li> list

Cookies would have to effect.

Can you show us a URL where we can see this?

Otherwise please post examples where it does not work correctly: URLs and the resulting list you get. Also a tag trace.

Offline

#5 2007-04-30 20:58:44

Dancul75
New Member
Registered: 2007-04-30
Posts: 4

Re: active_class doesn't appear for each section in <li> list

Mary, I get this output:

<!— txp tag trace:
[SQL (0.000474): select name from txp_lang where lang=‘en-us’ limit 1]
[SQL (0.010112): select name, data from txp_lang where lang=‘en-us’ AND ( event=‘public’ OR event=‘common’)]
[SQL (0.000288): select name, code, version from txp_plugin where status = 1]
[SQL (0.000208): select name from txp_section where `name` like ‘casino-games’ limit 1]
[SQL (0.000176): select * from txp_section where name = ‘casino-games’ limit 1]
[SQL (0.000218): select host from txp_log where ip=‘127.0.0.1’ limit 1]
[SQL (0.000242): insert into txp_log set `time`=now(),page=’/textpattern/Casino-Games/’,ip=‘127.0.0.1’,host=‘localhost’,refer=’‘,status=‘200’,method=‘GET’]
[SQL (0.000159): select user_html from txp_page where name=‘default’]
[Page: default]
<txp:page_title/> [SQL (0.000156): select title from txp_section where name=‘casino-games’]
<txp:feed_link flavor=“atom” format=“link” label=“Atom” />
<txp:feed_link flavor=“rss” format=“link” label=“RSS” />
<txp:css format=“link” />
<txp:section_list active_class=“here” default_title=“Home” include_default=“1” break=“li” wraptag=“ul” /> [SQL (0.000372): select name, title from txp_section where name != ‘default’ order by name]
<txp:category_list exclude=“Casinos” this_section=“1” active_class=“here” break=“li” wraptag=“ul” /> [SQL (0.000247): select name, title from txp_category where type = ‘article’ and name not in(‘default’,‘root’) and name not in(‘Casinos’) order by name]
<txp:feed_link label=“RSS” />
<txp:breadcrumb/> [SQL (0.000195): select lft as l, rgt as r from txp_category where name=’‘ and type = ‘article’]
<txp:article/> [SQL (0.000287): select count(*) from textpattern where 1 and Status = 4 and Posted <= now() and Section = ‘casino-games’] [SQL (0.000383): select *, unix_timestamp(Posted) as uPosted from textpattern where 1 and Status = 4 and Posted <= now() and Section = ‘casino-games’ order by Posted desc limit 0, 10] [SQL (0.000144): select Form from txp_form where name=‘default’] [Form: default]
[ ~~~ secondpass ~~~ ] —>

Page is at http://www.casinolocation.co.uk
Each section uses one (default) page, the section tag is same for all of them:
<txp:section_list active_class=“here” default_title=“Home” include_default=“1” break=“li” wraptag=“ul” />

Last edited by Dancul75 (2007-05-02 21:29:14)

Offline

#6 2007-05-11 17:52:33

variaas
Plugin Author
From: Chicago
Registered: 2005-01-16
Posts: 402
Website

Re: active_class doesn't appear for each section in <li> list

So this is similar to another issue I just helped trafnar with:

This link will make the active_class attribute work:
http://casinolocation.co.uk/?s=About-Us

I’m still investigating where the issue originates…

Offline

#7 2007-05-11 18:28:11

els
Moderator
From: The Netherlands
Registered: 2004-06-06
Posts: 7,458

Re: active_class doesn't appear for each section in <li> list

Also try changing section names to all lowercase. Not sure if it will help here, but using uppercase in names can sometimes cause problems.

Edit: Oh, I see variaas already mentioned that in the other thread.)

Last edited by els (2007-05-11 18:30:17)

Offline

#8 2007-05-11 18:37:15

Dancul75
New Member
Registered: 2007-04-30
Posts: 4

Re: active_class doesn't appear for each section in <li> list

Els wrote:

Also try changing section names to all lowercase. Not sure if it will help here, but using uppercase in names can sometimes cause problems.

Thank you, Els. The lowercase names solved the problem. I guess the textpattern engine could convert them automatically… in the next release.

Offline

Board footer

Powered by FluxBB