Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#16 2006-05-07 13:14:35
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: multiple level site structure (was: 10 problems...)
BTW, I edited this topic’s title to have it reflect the subject better.
Offline
#17 2006-05-07 14:58:08
- -P-
- Member

- From: Finland
- Registered: 2005-09-10
- Posts: 211
Re: multiple level site structure (was: 10 problems...)
Els wrote:
<blockquote> anoke, nice puzzle indeed ;) It’s all perfectly doable in my opinion, the biggest hurdle will be to make it as user friendly (and user proof) as possible. </blockquote>
Yes, that was exactly what I was thinking of too. Especially with combination “anybody can register”.
With sites that have multiple contributors even textile it self can add lot of confusion. My links got wrong, this system is shite, it broke my article, not to mention that many people use some text editor that formats text and then they just copy paste it to the actual system making horrible line breaks and stuff.
On the top of that you have to worry that people get gategories right and in the right order.
If all the articles go to section “World” and that is a default section, it of course helps a bit. But there´s still no way of preventing with current user privilege system that newly registered memebers can only post to “World”. Okay, it might not mess the site when posting to wrong section but then again it can. At least it is a one support question more sent to site admin. Or a unhappy/dissappointed contributor.
To prevent these kind of situations it would be good to have a ability in sections management to choose if a certain section is “admin only”. Been thinking it for a some time now and guess should post a mod/plugin request. That would at least clarify a bit.
But in gereral, combination of complex site structure and multiple authors with anybody can register is quite risky when thinking of working links etc. What I would do with it would be firstly extremely good documentation marked cleary “read this before submitting an article” ( maybe and that admin has to approve the articles before publishing.)
The help section could be password protected and I guess it is not impossible to hack the email notification that user gets when registering to have the additional info about the documentation url.
Offline
#18 2006-05-09 16:32:08
- saturnflyer
- Member
- Registered: 2006-01-22
- Posts: 40
Re: multiple level site structure (was: 10 problems...)
I’m trying to figure out a site structure as well and I’m trying to follow along, but I’m not sure I get it.
I understand how to create a navigation based upon my sections.
Is there a way to limit a category to a section?
Also, what I’d like to be able to do is to create a nested list of category names on one level, and then a list of the articles in that category on the next level.
To add to that. Once I’ve figured that out, its there a way to add a class or ID so that I can know which is the current article?
Thanks for any help.
Offline
#19 2006-05-09 18:20:32
- saturnflyer
- Member
- Registered: 2006-01-22
- Posts: 40
Re: multiple level site structure (was: 10 problems...)
Ok. I managed to get a list of Categories and a nested list of articles to work with
<pre>
<code>
< ul>
< li class=“Corporate-Travel”>< a href=”“>Corporate Travel< /a>
< ul class=“subnav”>
< txp:article_custom category=“Corporate-Travel” section=“services” sortby=“Posted” sortdir=“desc” listform=“localLink” />
< /ul>
< /li>
</code>
</pre>
“Corporate-Travel” is my category name, and I just created a static list of those with a generated list for the children.
The problem I want to solve is twofold.
1) I want to be able to set id=“current” (or something like that) to the list of articles if I am currently reading that article
2) I want to output the name of the current category, but it doesn’t seem to be working.
I’m using this code: < body class=”< txp:section/ > < txp:category / >” >
The section name is being output, but the category name is not.
Anyone have any idea why?
Last edited by saturnflyer (2006-05-09 18:38:13)
Offline
#20 2006-05-09 19:51:38
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: multiple level site structure (was: 10 problems...)
1) Maybe this plugin will help? glx_hl_current
2) <body class="<txp:section/ > <txp:category / >" /> should work, but will only output the category name if you are on a category page. Do you also want it on an individual article page?
(Just for future reference, it’s better to start a new thread for a new question than to post it in an existing thread, especially when the subject is somewhat different.)
Offline
#21 2006-05-09 20:24:55
- saturnflyer
- Member
- Registered: 2006-01-22
- Posts: 40
Re: multiple level site structure (was: 10 problems...)
I tacked onto this thread because I really am looking for a multiple level site structure and I don’t fully understand what’s being discussed here. (although I’ll move to a new thread if it makes more sense)
I’m trying to set up my site with 3 levels of navigation. I’m using sections for level 1, categories for level 2, and articles for level 3. I think the original post by Slashdot was asking for 4 levels.
I think its is similar to what anoke was talking about in his last post in this thread http://forum.textpattern.com/viewtopic.php?pid=110553#p110553
I’m not sure how to work in a category page though. How can you manage category pages in TXP? And how can I put content on a category page?
Offline
#22 2006-05-09 20:50:06
- els
- Moderator

- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: multiple level site structure (was: 10 problems...)
No need to move ;)
Category pages (meaning lists of articles belonging to one category) by default use the default section (site.com/category/name-of-category). If you want the categories to show on the section page you can create the links to those pages manually (site.com/name-of-section/?c=name-of-category). Read Stuart’s example here: Make a category listing use the same section and template.
How to put content on a category page: if you’re section is using it’s own template, then you can just use this code:
<code>
<txp:if_category>
<txp:article /></code> (with the attributes you need of course)
<code></txp:if_category>
</code>
Because the article tag is context sensitive it will only show articles in the requested category.
Offline