Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#13 2009-11-19 23:52:40
- element
- Member
- Registered: 2009-11-18
- Posts: 99
Re: Static pages
I’m a bit confused.
I had it in my preferences set to /section/id/title. I changed it to /section/title. Does this mean that any article without a title is a section page and any article with a title is an individual article page? It only seems normal behaviour to give every article a title.
Very confusing to me, in my case now:
www.domain.com/contact/ is exactly the same as www.domain.com/contact/contact/ because the contact page is in the section contact and has the title contact.
Last edited by element (2009-11-19 23:58:59)
Offline
#14 2009-11-20 01:39:12
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Static pages
element wrote:
/contact/contact
Yup, that’s not desirable. Two ways to work around:
a) Chose /title as URL scheme.
b) At least in the case of the contact page you could put your contact form and/or text immediately onto the page, not in an article.
(Note: I don’t know how many sections, pages, articles your site has, i.e. if any of that is viable.)
Does this mean that any article without a title is a section page […]
No, each article is an article ;) But if you chose to post it without a title its permlink would lead to a section page, namely the section the article is published to (a clean URL scheme provided). Because the URL-only-title field stayed empty the article only had the section as its URL. And here we’d have a not so viable solution c (in case the section would hold only one article)
Edit Oh, there’s of course solution d: From your section Contact don’t link to your article Contact (by enclosing your contact page elements with <txp:if_article_section name="contact">
so they’re output only there.)
and any article with a title is an individual article page?
No. Each page with an article title as the last element in the URL (again: clean URL scheme) is an individual article. Or (another way to say it): any article’s permlink opens an individual article page.
Last edited by uli (2009-11-20 01:56:00)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#15 2009-11-20 16:26:59
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Static pages
uli wrote:
But if you chose to post it without a title its permlink would lead to a section page, namely the section the article is published to (a clean URL scheme provided). Because the URL-only-title field stayed empty the article only had the section as its URL. And here we’d have a not so viable solution c
Hey Uli, if it really works like that (never tried it myself), it looks like you found a workaround to prevent static articles (used only on the section landing page) from showing up as individual articles: just leave the title field blank :) Easier than setting up a redirect in .htaccess… Of course it would only work for one article per section.
(in case the section would hold only one article)
I think it should also work if a section has more than one article (provided the other articles are not meant to be static).
Offline
#16 2009-11-20 17:18:59
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,306
Re: Static pages
Els wrote:
Hey Uli, if it really works like that
Yup, if you get a “URL-only title was left blank” on saving, the article’s link (“View”) is http://your_site/articles/
it looks like you found a workaround to prevent static articles (used only on the section landing page) from showing up as individual articles: just leave the title field blank :)
I think you’d have to make exceptions for it over and over again, think of article list with titles in them. But where do you see it differing from method d, i.e. not showing a link for that one article? (Despite it’d have a title.)
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
#17 2009-11-20 17:51:11
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Static pages
uli wrote:
But where do you see it differing from method d, i.e. not showing a link for that one article?
Of course not showing a link should be enough. I was only thinking about something that happened to me a couple of times: using a (google) sitemap plugin, forgot to manually remove the article pages in question from it, so Google indexed them ;) (Note that this doesn’t happen anymore since I use rah_sitemap, much easier to configure!)
Offline