Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#16 2006-10-17 20:46:16

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

Re: Changed a few things and now clicking catgories does nothing....

But I did just want to clarify, when you say “Don’t forget to assign the default page to section ‘article’ again then”, what do you mean? My default section has never been set to use page ‘article’, so don’t know why I would set it ‘back’ to article when it’s not every been that way. My default section has always used ‘default’ style and page.

I meant it the other way around: you are using page template ‘article’ for section ‘article’, and in this hypothetical case you should change it back to page template ‘default’.

About the conditionals: you can use as many as you want, or move as much code as possible into one conditional, just do what works and what helps you best to keep the overview. On my site I’ve got about 10 sections and a number of categories, and I’m using only one page template. It’s quite full of conditionals, besides if_section and if_category I’m also using if_individual_article and if_custom_field, and whatever conditional I could find… ;) Now I still can find my way around, but I can imagine that others prefer less or no conditionals and separate page templates instead. At least I never noticed that all this is slowing down my site.

You can nest them, but not in themselves. So
<code>
<txp:if_section name=“x,y,z”>
blah
<txp:if_section name=“y”>
blah blah
</txp:if_section>
</txp:if_section>
</code>
is not possible. And I think you can’t use <txp:else /> more than once in one condition.

Last edited by els (2006-10-17 20:49:33)

Offline

#17 2006-10-20 23:06:39

deronsizemore
Member
From: Kentucky
Registered: 2005-11-02
Posts: 324

Re: Changed a few things and now clicking catgories does nothing....

Els, sorry it’s taken me so long to reply to your post. I’ve not had time to work on my site or anything much here the last couple days.

I truely thank you for your help with my site! I think I’ve finally got a good handle on how it works. You answsered another question I had before I asked it even. I was going to say, the way I have my site set up right now, I have lots of sections and lots of pages, when hypothetically depending on how my site is set up, I could have one single page template and just throw all kinds of conditionals in there to display it how i want.

Say if I did that, and I’ve got a setup like my current site. I’m using one template and I have an <txp:if_section name="xyz">blah@</txp:if_section> for the left content and then I have one in the middle area and then I also have one in the right content area of my site…that’s perfectly legal right?

Offline

#18 2006-10-20 23:10:36

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

Re: Changed a few things and now clicking catgories does nothing....

Yep, you can do that without a problem :)

Offline

Board footer

Powered by FluxBB