Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Getting dynamic metadata working in Textpattern
Hi there,
I am a Textpattern newbie and I can’t seem to get dynamic meta keywords and description to work. Where am I going wrong? On my pages I have:
<txp:if_section name=”“>
<txp:article_custom section=“homepage” status=“sticky” form=“meta_dynamic” />
<txp:else />
<txp:if_individual_article>
</txp:article status=“sticky” form=“meta_dynamic” />
</txp:if_individual_article>
</txp:if_section>
(meta_dynamic form is just this as an article form:)
<title><txp:page_title /></title>
<meta name=“description” content=”<txp:custom_field name=“Meta_Description” /> />
<meta name=“keywords” content=”<txp:keywords />” />
Can anyone help?
AL
Offline
Re: Getting dynamic metadata working in Textpattern
<txp:if_section name="">
<txp:article_custom section="homepage" status="sticky" form="meta_dynamic" />
<txp:else />
<txp:if_individual_article>
<txp:article status="sticky" form="meta_dynamic" />
</txp:if_individual_article>
</txp:if_section>
You had a typo in the second <txp:article/>
. I can’t remember if this kind of nesting works with the 4.0.6 parser though.
Edit: Your article_custom won’t pull the keywords for the current article though – check out rah_metas for a simpler way.
Last edited by jm (2008-07-15 22:09:03)
Offline
Re: Getting dynamic metadata working in Textpattern
Brilliant Jon-Michael. Great plugin. Thanks so much!
Offline
Re: Getting dynamic metadata working in Textpattern
I don’t know rah_metas yet but you may want to have a look at Trick: Textpattern with page dependent header meta description (and the comments!) which is an older article on performancing.com by me.
Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML
Offline