Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2006-03-09 17:09:05
- elstob
- New Member
- Registered: 2006-03-09
- Posts: 2
Best Practice Question. Section has an article?
If I want a site structure like
about/
about/history
about/team
solutions/
solutions/finance
solutions/telecoms
but instead of displaying a list of the articles in about/ and solutions/ I instead want to display a single article which is an introduction to about/ or solutions/. What is the best way to do that?
thanks
Last edited by elstob (2006-03-09 17:09:47)
Offline
Re: Best Practice Question. Section has an article?
I’d suggest the /section/title permalink mode for you. And then you can either (a) title your article using the names above (i.e., history, team, finance, etc), or (b) use the URL-only title attribute under advanced options for each article.
As for displaying a single article in each section’s “article list” page, that’s no problem. Your code for those section template(s) would probably look something like this:
<code><txp:if_article_list><txp:article_custom id=“80” form=“intro” /></if_article_list></code>
Hope this helps!
Offline
#3 2006-03-10 00:01:55
- elstob
- New Member
- Registered: 2006-03-09
- Posts: 2
Re: Best Practice Question. Section has an article?
hey thanks a lot, yeh that makes sense… I think.
In response to the second part of the question would that mean I would need a different page template for each section? or is there a away I can work out which section I am in and then output an article with a set category?
Last edited by elstob (2006-03-10 00:02:17)
Offline
Re: Best Practice Question. Section has an article?
<blockquote>would that mean I would need a different page template for each section?</blockquote>
Nope, that’s not necessary. If you’d like, you can use a single template throughout your entire site, and differentiate things using conditional tags. These tags (but there are others) should help you get started:
- <a href=“http://textpattern.net/wiki/index.php?title=Txp:if_section”>txp:if_section</a>
- <a href=“http://textpattern.net/wiki/index.php?title=Txp:if_category”>txp:if_category</a>
- <a href=“http://textpattern.net/wiki/index.php?title=Txp:else_/”>txp:else /</a>
Last edited by Elenita (2006-03-10 01:50:23)
Offline