Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
#1 2006-01-17 17:54:51
- Dawk
- Member
- Registered: 2005-02-22
- Posts: 74
page for each category?
I’ve searched a lot & still can’t figure this out?
I have a main News section & a lot of news Categories. How to I specify a Page layout for each Category?
I only see support for Section Pages in admin?
EDIT:
I think I need to use < txp:if_category name=“daily-news”>
thats as far as I’ve got though :)
Thanks a bunch
Last edited by Dawk (2006-01-17 18:10:55)
Offline
#2 2006-01-17 20:21:04
- Dawk
- Member
- Registered: 2005-02-22
- Posts: 74
Re: page for each category?
well, I found a way to do it I think? seems like kind of a fudge though.
Looks like I can use the code below & create a separate ‘Form’ for each template I need…
<code>
<txp:if_category name=“daily-news”>
<txp:article form=“daily-news” />
</txp:if_category>
<txp:if_category name=“site-news”>
<txp:article form=“site-news” />
</txp:if_category>
</code>
was hoping for a magical <code><txp:article page=“daily-news” /></code> tag :)
should work fine for most, 1 section will have about 20 categories though.
Will 20 < txp:if_category’s be a query fest? lol
Offline
#3 2006-01-17 20:41:20
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: page for each category?
Do those article forms differ in the use of tags, or more in layout aspects like background colour etcetera? If the latter, you could try using tags like <div class="<txp:category1 />">
in the article form and define the classes in the CSS.
Offline
#4 2006-01-17 20:49:38
- Dawk
- Member
- Registered: 2005-02-22
- Posts: 74
Re: page for each category?
Hey Els :)
Theres quite a bit of difference in markup, way more than CSS can handle. At least more than css can handle & keep my legacy browser support.
I have a 3col tableless(valid1.1) thats good back to IE5.0 now, not going to open that can ‘o worms lol
edit:
Another thing that just occured to me is…
My Page code is going to be a doctype & thats about it going the Form route, everything from the title tag down is specific to each category. title, meta, alternate RSS/Atom links etc. etc. etc.
goin to have to make that Form textarea a little bigger too lol
Last edited by Dawk (2006-01-17 20:56:12)
Offline
#5 2006-01-17 22:19:10
- zem
- Developer Emeritus
- From: Melbourne, Australia
- Registered: 2004-04-08
- Posts: 2,579
Re: page for each category?
Dawk,
It sounds to me like you’re using categories when you should be using sections.
Alex
Offline
#6 2006-01-17 22:31:58
- Dawk
- Member
- Registered: 2005-02-22
- Posts: 74
Re: page for each category?
Ah man, ok lol… dorksplaps self :)
I was letting the document tree rule my thinking!
That would actually solve another matter I wasn’t 100% happy with either, the lack of a section/category/title method for URL’s
Glad I came to a full stop until I got to the bottom of this, not too much trouble to reset everything up now & section/title will work perfectly this way.
Thanks a bunch …off & runnin’ again! :)
Offline
#7 2006-02-04 00:48:23
- sauo
- Member
- Registered: 2005-07-05
- Posts: 11
Re: page for each category?
Hi,
I have a similar question. I set up my root site with sections and one of the section is blog. On my blog I have couple of categories for my entries (btw. database of my blog has been imported from wordpress to textpattern into the “blog” section). Now I would like to have my categories using my blog’s template not a default one. Now I have one template for the main site, one for subsites and one for blog. When I browse (from my blog section) for category my entries jump into default template… I would like to have my categories show in proper section, something like: mysite.com/blog/?c=categoryname not like I have now: mysite.com/?c=categoryname. Is it possible? Thanx in advance!
Offline
Re: page for each category?
I think you may be looking for this little trick.
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#9 2006-02-04 11:05:10
- sauo
- Member
- Registered: 2005-07-05
- Posts: 11
Re: page for each category?
Thank you very much :) I posted the following question there ;) http://forum.textpattern.com/viewtopic.php?pid=98012#p98012
Offline
Pages: 1