Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Semantics / structure question
I’m thinking through a future project, and hoping for a bit of advice. Here’s the structure:
City 1
Static Page A
Static Page B
Blog / News
City 2
Static Page A
Static Page B
Blog / News
City 3
Static Page A
Static Page B
Blog / News
Static Page 1
Static Page 2
I was thinking of making sections for each city and static pages 1 and 2, but I’m wondering how I would separate static content from blog content in those City sections. Is it appropriate to use categories for that? Seems like sort of a waste of categories.
Been a long day already, so any tips would help my aching brain. Thanks. :-)
Last edited by maruchan (2010-12-14 22:32:58)
Offline
Re: Semantics / structure question
You could make all the static pages sticky. Then again, how were you thinking of using categories? From your outline it seems to me that categories are mainly going to be useful for allowing users to search through blog/news items. So I don’t see why you’d be wasting categories to use them for designating static articles.
Code is topiary
Offline
Re: Semantics / structure question
So I don’t see why you’d be wasting categories to use them for designating static articles.
Yep, that’s my concern too. My outline is more of a question — how would you do it? I’ve been working with an “other leading brand” CMS today (and I’m relatively new to TXP) so my mind is sort of burnt out.
Offline
Re: Semantics / structure question
Does this help?
A refresher on static pages: Txp FAQ: How Do I Manage Static Pages
You can also use a custom article and the article id to create faux static content that mixes w/ your blog content . . .
Last edited by maverick (2010-12-15 00:40:14)
Offline
Re: Semantics / structure question
I was unclear — I meant I don’t think it would be a waste of categories to use them this way. Static pages, by definition, have less need of categorization than dynamic pages. For those static pages, if you don’t “waste” a category to designate them as static, what will you use the extra category for?
Code is topiary
Offline
Re: Semantics / structure question
Thanks, Jeff.
You can also use a custom article and the article id to create faux static content
Not sure I understand that…can you explain, Mike?
I think I will then just use sections for the Cities and either use sticky status or a category to denote static content. I kind of want to use the sticky feature for the blog, so I’m guessing that eliminates it for use as a static page designator. So I’m left with using “exclude category ‘static’” for the blog and direct links to article URLs for the static pages.
Sound right?
Last edited by maruchan (2010-12-16 04:42:56)
Offline
#7 2010-12-16 08:26:51
- ibob
- Member
- From: Finland
- Registered: 2010-06-14
- Posts: 35
Re: Semantics / structure question
I’m not sure if this is what you wanted but here’s few options:
Option 1. With separate sections
Categories:
Blog
Blog Category
Blog Category
Blog Category
And sections:
City1
City2
City3
Now with blog items, use some of the categories and for static article just dont use category. To list them do something like:
<txp:article_custom section='<txp:section />' />
<txp:if_article_category>
- Dont do anything -
<txp:else />
<txp:title /><txp:body /> etc
</txp:if_article_category>
</txp:article_custom>
Urls www.somesite.com/helsinki/where-to-go-in-helsinki
Option 2. With one section
Since I want to keep section list as small as possible I would just do one City -section and put categories like this:
Cities
City1
City2
City3
Then I’d use category2 just like in 1st option. Listing static articles would go (You need to use categories in urls):
<txp:article_custom section='<txp:section />' category='<txp:category />' />
<txp:if_article_category number="2">
- Dont do anything -
<txp:else />
<txp:title /><txp:body /> etc
</txp:if_article_category>
</txp:article_custom>
Urls www.somesite.com/city/helsinki/where-to-go-in-helsinki
Use gbp_permanent_links
Option 3. Custom_field
Create one custom field for example “layout” and for static articles set it’s value to “static”. Sections and categories can be like in 1. option or second.
Now to list static -articles:
<txp:article_custom layout="static" +category/section stuff+ />
Last edited by ibob (2010-12-16 08:32:29)
Offline
Re: Semantics / structure question
Wow, I’d never have thought of those. I do like Option 1…seems like it might be easiest for training my writers.
Thanks, ibob!
Offline
Pages: 1