Textpattern CMS support forum

You are not logged in. Register | Login | Help

#31 2015-06-22 15:00:15

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: Description field and tag

philwareham wrote #291816:

Actually format="" is pretty good idea, it’s got previous history on other tags’ syntax.

Cool.

I’m still leaning towards deprecating <txp:keywords> tag.

Fine by me.

<txp:author> has other uses outside of meta stuff, so I don’t see that as an inconsistency.

Yeah, it is kind of an anomaly in that regard.

I’ll see what I can come up with and give it a spin.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#32 2015-06-22 15:11:03

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: Description field and tag

Although not directly related, if we were looking at tag attributes with a view to trying to consolidate them over time, there’s nothing to stop us using it as a vehicle to run certain attributes side-by-side for a while.

The immediate one that springs to mind is form. If the lAtts() function had a conditional added to it such that any time it saw form it rewrote it as, I dunno snippet or something, then existing tags and plugins continue to work, but we’d be free on the admin side to rename every instance of the attribute form and all the admin widgets likewise. When we publicise the change of name, we just let the two run side by side for a few major versions and then remove the conditional in lAtts() so form is no longer recognised, once plugins have caught up. We’d need a replacement tag for <txp:output_form> still.

I also like the escape attribute and think it should be on more tags that offer different output options. That means we can do more stuff with them like injecting content into other tags. Being forced to have the output sanitized when it’s not destined for the screen seems a holdover from when tags were not permitted as attributes and container support was limited. Yes it’s a security risk, but as long as it’s on by default (which it is in all instances) I don’t see the harm in allowing a designer to turn it off if they know what they’re doing or intend to sanitize via an external manner.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#33 2015-06-23 08:08:05

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,315
Website

Re: Description field and tag

Hi Stef

For txp:keywords i personnaly use it like a tag field for some website when needing a multiple category assignement for articles i hope the tag will not be removed even if tagged as deprecated (it will be annoying to have the message on front end when working on those website!! can be those message put off with a pref?)

I am also in favour for adding description or meta description, that is now common for SEO.

Cheers

Offline

#34 2015-06-23 08:52:56

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 1,745
Website

Re: Description field and tag

Dragondz wrote #291850:

(it will be annoying to have the message on front end when working on those website!! can be those message put off with a pref?)

The warning will only be visible when you set textpattern in testing mode (in the prefs).
Then you can easily replace the old tag with the new one: <txp:meta_keywords format="" separator=", " /> in your templates.

Offline

#35 2015-06-23 09:03:30

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: Description field and tag

Dragondz wrote #291850:

For txp:keywords i personnaly use it like a tag field

So do I. Even though the tag is (tentatively, I may be swayed to reinstate it) deprecated, you can still get the list of keywords by issuing:

<txp:meta_keywords format="" />

That performs exactly the same function as the <txp:keywords> tag did, but has the benefit that you don’t (necessarily) need the conditional <txp:if_keywords> around it, because it will automatically display nothing if no keywords are defined.

In addition, I’ve just added the separator attribute which means you can output the list in a more readable format if you wish. I’m toying with permitting it to be used as a container so you can customise the output more. Not sure if it’s worth it.

I am also in favour for adding description or meta description

<txp:meta_description> has landed for 4.6.0 on articles, sections and categories. Hope they prove useful.


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#36 2015-06-23 10:11:01

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: Description field and tag

If anyone wants to give these a try, I’ve done some initial documentation of the tag changes:

meta_keywords

meta_description

If you spot any errors or improvements for those docs, then raise an issue or mention here.

Offline

#37 2015-06-23 10:12:31

Dragondz
Moderator
From: Algérie
Registered: 2005-06-12
Posts: 1,315
Website

Re: Description field and tag

Thanks Stef for clarification.

Offline

#38 2015-06-23 12:28:04

Destry
Moderator
From: Haut-Rhin
Registered: 2004-08-04
Posts: 4,284
Website

Re: Description field and tag

philwareham wrote #291859:

If you spot any errors or improvements for those docs, then raise an issue or mention here.

Assuming I understand the function of these tags so far, and that I understood your doc, then they could be cleared up a bit, for example…

——

<txp:meta_keywords />

The meta_keywords tag is a single tag used in one of two ways, or both. One is to output keyword data as the content of a standard HTML meta tag in the head of a page template:

<meta name=“keywords” content=“{your keywords}” />

The other is to output raw keyword text anywhere else:

{your keywords}

Context of use must be with a single article (as opposed to an article list). The tag can be added directly in a [[Page template]] or as part of an article [[Form template]]. Either way, you may also nest it in a given article tag.

Note: The corronsponding keywords field has a 255 character limit by default, which includes spaces and commas. This is the MySQL database default. You can edit the default using phpMyAdmin, for example.


Wordworkin’ for you.

Offline

#39 2015-06-23 12:45:22

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 8,813
Website

Re: Description field and tag

Destry wrote #291870:

they could be cleared up a bit

Much obliged. I’ll clean up the meta description tag in a similar manner for clarity next.

EDIT: no I won’t, Phil’s done it!


The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.

Txp Builders – finely-crafted code, design and Txp

Offline

#40 2015-06-23 13:04:48

philwareham
Core designer
From: Farnham, Surrey, UK
Registered: 2009-06-11
Posts: 3,209
Website

Re: Description field and tag

Sorry, we were both editing the same file for a minute there! Done now.

Offline

Board footer

Powered by FluxBB