Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
Pages: 1
txp:category_description
The long-awaited field to describe an article category appeared on Contents: Categories: Edit Category panel of Textpattern v.4.6, thanks to devs! What is the appropriate tag name, though? My guessed <txp:category_description />
is invalid. There are meta_description, link_description and file_download_description listed on Textpattern.net and Textpattern.io tag reference libraries. And introduction of meta_description (with if_description) only mentioned in the weblog post about Textpattern 4.6.0 release.
Last edited by Vienuolis (2016-12-12 12:39:16)
Offline
Re: txp:category_description
The <txp:meta_description />
tag is clever enough. I had a similar question here which was thoroughly answered by Stef.
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp:category_description
I believe this is Stef’s thorough answer.
The <meta_description /> tag is context aware and tries to be smart about what description it pulls. If you’re on a section landing page it uses the section description, if you’re on an individual article it uses the article’s meta description. If you want to alter the default, use the type attribute to override it. – Bloke
Offline
Re: txp:category_description
michaelkpate wrote #303235:
I believe this is Stef’s thorough answer.
he didn’t need to expand more! :)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: txp:category_description
What a smart way! I’ve found my mistake: forgot form="raw"
— no text would displayed without this attribute. Thanks for your help!
Offline
Re: txp:category_description
I would also HTML to be allowed in a description field — as I have made under a section title on.lt/apydaira/ Sorry for my greediness.
Offline
Re: txp:category_description
Sorry for my impatience — HTML in description is valid too, with an attribute escape=""
.
Offline
#8 2016-12-12 19:18:32
- GugUser
- Member
- From: Quito (Ecuador)
- Registered: 2007-12-16
- Posts: 1,473
Re: txp:category_description
Offline
Re: txp:category_description
Vienuolis wrote #303239:
Sorry for my impatience — HTML in description is valid too, with an attribute
escape=""
.
Sure you can do that. The problem then is if you want to use the <txp:meta_description />
in the <head>
of a document, it will output those html
entities in your text (description), which is not really nice for search engines (about the only ones who see the <meta name="description" content="...">
). You probably can work around that with a plugin that actually strips those tags out, e.g. smd_wrap or similar.
Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern
Offline
Re: txp:category_description
I see. And I’ve replaced a former custom field for <meta description>
with the special <txp:meta_description />
tag in <head>
right away 4.6 released. But I was confused by the term ‘meta’ and looked also for non-metadata tag, such as <txp:category_description />
— similar to existing <txp:link_description />
, <txp:file_download_description />
tags. Both metadata and visible descriptions are now implemented together in the same webpage and work fine (for example, on.lt/category/kronika/) — thanks to Stef for such smart tag, and thank you all for the great help.
Last edited by Vienuolis (2016-12-13 10:45:21)
Offline
Pages: 1