Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#13 2006-05-07 10:23:15

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

Re: multiple level site structure (was: 10 problems...)

I’ve been thinking about this, if you’ll have lots of users keywords and/or custom fields could be a problem, anything can be entered there. So if for example one user writes ‘Lisbon’ and another one ‘Lisboa’ in the city field, your site navigation will become a mess.

From this point of view you might be better off using categories and rss_unlimited_categories:
section: world
category 1: continent
category 2: country
category 3: city

You’d have to add all categories yourself, but al least it will be consistent.

Last edited by els (2006-05-07 10:24:48)

Offline

#14 2006-05-07 12:05:37

anoke
Archived Plugin Author
Registered: 2006-04-15
Posts: 152

Re: multiple level site structure (was: 10 problems...)

Els,
yep, I too thought of that. I started thinking that easy to manage categories is more important value in the question “possible messy navigation vs gigantic category structure”. If we assume there’s 7 continent each with 10 countries and 10 cities that would create 7*10*10=700 nodes in the category tree…

If admin doesn’t like to add those then users would have to be managing editors to add categories. Self registered users as managing editors doesn’t sound too good I think.. Tagging etc yields to typos and possible misuse but with tag clouds and so on they could be at least monitored.. (but yes – that isn’t ideal)

But (this departs from the original idea now) if we have
- continents as sections
- countries as categories

we could navigate IMHO decently, browse categories and then do

<txp:article listform="divide_by_customfield" sortby="customfield_1"/>

and clean the output in the form with if_different to have something like:

( s = Europe, c = Finland )

Helsinki:
  • article1
  • article3
  • article4

Tampere:

  • article2
  • article5

I think customfields can be used like that but I have never tried it.. There will always be a change of misuse but in this way the typos would be seen on the city level only. One can change this example to use only one category by having category tree “continent_name / country_name” – having continents as sections was just an quick idea..

How to solve this depends how the admin wants to list the articles.. Anyways – I think having cities as categories isn’t a very good idea – everything else is debatable (:

(nice puzzle i think..)


- When chickens are cold, they roost in trees; when ducks are cold, they plunge into water -

Offline

#15 2006-05-07 13:04:32

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

Re: multiple level site structure (was: 10 problems...)

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. I’m curious what Slashdot will come up with…

Offline

#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

Board footer

Powered by FluxBB