Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2013-04-11 01:34:40
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Different groups of keywords for each page coming from a same template
I need to set the keywords in the meta tag ‘keywords’, for 12 different pages (1 x section), generated from a same template, but I would like to prevent using (to prevent slowing them) :
<txp:if_section name=”“>
<meta name=“keywords” content=”“ />
</txp:if_section>
<txp:if_section name=”“>
<meta name=“keywords” content=”“ />
</txp:if_section>
………….
Is there any way to intercept the section name of each page
(as possible for the articles placed in a same section by means of <txp:article_custom section=’<txp:section />’ />)
and make it display the matching group of keywords in the respective meta tags?
Thanks
Last edited by Bongo-man (2013-04-11 10:36:36)
Offline
#2 2013-04-11 11:23:35
- uli
- Moderator
- From: Cologne
- Registered: 2006-08-15
- Posts: 4,315
Re: Different groups of keywords for each page coming from a same template
Starting from the assumption you’d like to store your section keywords in forms, you’d name these forms according to a scheme like keywords-for-SECTIONNAME
and would call them with <meta name="keywords" content="<txp:output_form form='keywords-for-<txp:section />' />" />
.
In bad weather I never leave home without wet_plugout, smd_where_used and adi_form_links
Offline
Re: Different groups of keywords for each page coming from a same template
Keep in mind that keywords are ignored by google.
Uli’s code is nevertheless excellent for meta description:)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
#4 2013-04-11 16:26:24
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Re: Different groups of keywords for each page coming from a same template
Thank you very much Uli, it works fine.
Offline
#5 2013-04-11 16:51:33
- Bongo-man
- Member
- Registered: 2009-03-18
- Posts: 243
Re: Different groups of keywords for each page coming from a same template
Thanks colak, for your information.
Last edited by Bongo-man (2013-04-11 23:30:23)
Offline