Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2007-05-11 06:37:55

trafnar
New Member
Registered: 2007-05-11
Posts: 6

problem excluding a section in <txp:section_list

Hi, I’m new here, just installed texpattern and so far its really great. I’d appreciate assitance on this issue that is buggin me:

<txp:section_list default_title=“Home” include_default=“1” exclude=“Front” />

I have a section called ‘front’ where i put things that i want to show up only on the front page. I don’t want this to shop up in my nav because I use ‘home’ for that.

Unless there is some way to categorize an article as ‘default’ only and not have it be a member of another category, i need a way to keep ‘front’ hidden.

‘Front’ though excluded, shows up if i click a ceartain category. It doesn’t show up on the home page, only on one of my 2 categories.

http://www.iphoneexponent.com/ is the site where its running.

thanks!!

Offline

#2 2007-05-11 06:53:40

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

Re: problem excluding a section in <txp:section_list

Welcome to the community –

So one thing to learn is the difference between a section and a category. There is an abundance of information on the forum here and at the TextBook.

From your site it looks like you set up three sections (Accessories, Articles, and Front). You must define a page and style for each section, so my first question would be: are all the sections using the same page? If not, you want to make that the page for each section has the exclude condition set, or rather just have them all use the same page.

Offline

#3 2007-05-11 07:00:07

trafnar
New Member
Registered: 2007-05-11
Posts: 6

Re: problem excluding a section in <txp:section_list

Thanks for the helpful reply.

I think I understand the difference between sections and categories.

I want the links along the right to be actual sections of the site, not just categories for various posts. They each have their own set of posts, that should display only on that page.

I realized based on what you said that I am using the wrong template on one of the sections. I fixed that. And now it work! so thanks for that.

However, I have noticed a new problem which may be similar. I am using active_class=“active” on my navigation links, yet it only seems to take effect on the ‘home’ (which is default) link. If I click on any other link, then none of them get the ‘active’ class applied.

Any thoughts?

Offline

#4 2007-05-11 16:04:44

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

Re: problem excluding a section in <txp:section_list

It would help if you can post your txp tag for the section list. I’m not sure off the top of my head what could be the problem.

Offline

#5 2007-05-11 17:13:47

trafnar
New Member
Registered: 2007-05-11
Posts: 6

Re: problem excluding a section in <txp:section_list

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

Thats the tag. I have a style set up for class=“active” but the class only gets applied if you view the front page, or an individual article. You can try it out and see. iphoneexponent.com

Offline

#6 2007-05-11 17:27:37

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

Re: problem excluding a section in <txp:section_list

Hey trafnar,

So I did a quick search on the forum and this issue seems similar to this issue. Mary had requested the tag trace as well there, so I would provide the same. Mary might have some more insight as well.

Offline

#7 2007-05-11 17:31:12

trafnar
New Member
Registered: 2007-05-11
Posts: 6

Re: problem excluding a section in <txp:section_list

Thanks, you have been very helpful. I checked out that thread. I’ll keep debugging and If I come up with a fix I’ll post it back here, and in the other thread.

Offline

#8 2007-05-11 17:37:21

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

Re: problem excluding a section in <txp:section_list

So out of curiosity…what are the exact names and titles to your sections (case matters). I’m noticing that active_class will fail if the section name and title aren’t the same…I’m still investigating, but try setting the section’s title and name to exactly the same case.

Offline

#9 2007-05-11 17:40:49

trafnar
New Member
Registered: 2007-05-11
Posts: 6

Re: problem excluding a section in <txp:section_list

Front/Front, Articles/Articles, Accessories/Accessories

Default is being renamed to ‘Home’ in the tag.

Offline

#10 2007-05-11 17:42:14

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

Re: problem excluding a section in <txp:section_list

So did some more unit testing and found these results. Again I need to debug more to find the root cause, but make your Section Name all lower case. So you can have your section title be “Accessories” but keep the section name “accessories”.

Offline

#11 2007-05-11 17:45:28

trafnar
New Member
Registered: 2007-05-11
Posts: 6

Re: problem excluding a section in <txp:section_list

Hey, it worked :)

Thanks!

Offline

#12 2007-05-11 17:49:16

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

Re: problem excluding a section in <txp:section_list

Glad to hear…now I wonder why it’s like that…

Offline

Board footer

Powered by FluxBB