Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
Changing content between <title> tags
Hi,
Is there some way to change the text published between <title> tags, for which we standard use <txp:page_title />?
I would rather get rid of the site name (or bring it to the back) and only publish (SEO purposes):
+ the first category of the article
+ the article name
Anyone? Many thanks!
Offline
Re: Changing content between <title> tags
see Mary’s post
note: next release means 4.0.4
Last edited by jayrope (2006-11-06 17:42:33)
A hole turned upside down is a dome, when there’s also gravity.
Offline
Re: Changing content between <title> tags
Hi Jayrope,
I tried Mary’s code, although a little changes to show the category first.
<txp:if_status status="200"> <txp:if_section name="default"> <txp:sitename /> <txp:else /> <txp:if_article_list> <txp:category title="1" /> · <txp:sitename /> <txp:else /> <txp:category1 title="1" /> · <txp:title /> · <txp:sitename /> </txp:if_article_list> </txp:if_section> <txp:else /> <txp:error_status /> · <txp:sitename /> </txp:if_status>
It works in all situations accept when a category page is displayed: the category will not show. Any idea why <txp:category title=“1” /> does not function?
Many thanks.
Offline
#4 2006-11-06 20:19:53
- Mary
- Sock Enthusiast
- Registered: 2004-06-27
- Posts: 6,236
Re: Changing content between <title> tags
If you’re using the default category page, that’d be why – it uses the default section. Change this bit:
<txp:if_section name="default">
<txp:sitename />
to:
<txp:if_section name="default">
<txp:if_category><txp:category title="1" /> · </txp:if_category><txp:sitename />
Offline
Re: Changing content between <title> tags
It works.
Many thanks Mary!
Offline
Pages: 1