Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2018-02-27 14:32:02

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 91
Website

About meta description

I have a website built with Textpattern 4.5.7 and I need to output different description metadata in a section (Podcast) and in each article belonging to that section. Unfortunately <txp:meta_description /> will not work with version 4.5.7. Currently the description metadata is hard-coded in the page template. Any tips? The website is www.mindfulnessbergamo.net. Thanks.

Offline

#2 2018-02-27 14:52:34

colak
Admin
From: Cyprus
Registered: 2004-11-20
Posts: 9,032
Website GitHub Mastodon Twitter

Re: About meta description

Hi gilibaus,

You could try:

<txp:if_section name="podcast">
<meta name="description" content="some description" />
<txp:else />
<txp:hide>you are in another section</txp:hide>
<meta name="description" content="generic description" />
</txp:if_section>

In fact, you can use the if_section tag to make separate descriptions per section.


Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.

Offline

#3 2018-02-27 14:56:33

gaekwad
Server grease monkey
From: People's Republic of Cornwall
Registered: 2005-11-19
Posts: 4,150
GitHub

Re: About meta description

Hi gilibaus – with the risk of answering your question with another question – are there reasons why you’re running with the 4.5.7 version over the current 4.6.2 version? Are there specific plugins that prevent you upgrading? Your <txp:meta_description /> issues should be resolved with 4.6.0 onwards.

I did podcasting some years ago and used Textpattern as the base CMS, I may have an archive of tips and hacks I gathered together…I’ll check my stash tonight and see what I have.

Offline

#4 2018-02-28 07:49:38

gilibaus
Member
From: Italy
Registered: 2013-08-14
Posts: 91
Website

Re: About meta description

I solved adding this into the page template:

<txp:if_individual_article>
<txp:arc_meta_description />
<txp:else />
<meta name="description" content="some podcast description" />
</txp:if_individual_article>

where <txp:arc_meta_description /> outputs the description metadata of the single episode.

@gaekwad no real technical reason for not upgrading, just need some more spare time to do it. As for podcasting tips and hacks, they would be welcome!

Thank you all for your support.

Last edited by gilibaus (2018-02-28 07:53:39)

Offline

Board footer

Powered by FluxBB