Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#25 2008-10-31 20:03:03
- masa
- Member
- From: Asturias, Spain
- Registered: 2005-11-25
- Posts: 1,091
Re: Messy Structure
BTW here’s google’s official explanation
Offline
#26 2008-10-31 20:46:34
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Messy Structure
If you want the article page to return a 404, you could do this:
<txp:if_individual_article>
<txp:if_article_id id="123">
<txp:txp_die status="404" />
</txp:if_article_id>
</txp_if_individual_article>
(edited: typo. Thanks Jukka!)
Last edited by els (2008-10-31 21:28:12)
Offline
Re: Messy Structure
Els wrote:
If you want the article page to return a 404, you could do…
No, there is typo in your code, Els.
It’s <txp:txp_die />
, not <txp:die />
.
Reason: die()
is already registered function by PHP, so Textpattern uses txp_die()
. (That is the most common typo made in TXP-tag tutorials – even official FAQs and tag lists used to use die instead of txp_die).
Last edited by Gocom (2008-10-31 21:07:43)
Offline
#28 2008-10-31 21:27:23
- els
- Moderator
- From: The Netherlands
- Registered: 2004-06-06
- Posts: 7,458
Re: Messy Structure
Thanks Jukka, edited my post above.
Offline
Re: Messy Structure
Els wrote:
<txp:if_individual_article>
<txp:if_article_id id="123">
<txp:txp_die status="404" />
</txp:if_article_id>
</txp_if_individual_article>
This could be very useful for the right situation. Thanks!
I’m wary of using this as a standard for “static” pages. Seems like something that should be mentioned in the static page FAQ if the content is indeed duplicated. On the other hand, I tried searching for terms that are unique to my sticky pages in Textpattern’s search, and nothing came up.
I reckon that’s due to not using the stearchsticky
attribute.
Offline
Re: Messy Structure
johnstephens wrote:
Is there a tag or plugin that tests for sticky status? Then you could just put in a meta robots tag that says “no-index.”
<txp:if_status
won’t work— it refers to http status codes.
Nice.
Offline