Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2012-12-25 21:08:59

pompilos
Member
From: Spain
Registered: 2005-06-07
Posts: 114
Website

Order of informations displayed by <txp:page_title />

Hi.

The <txp:page_title /> tag displays a pair of informations, e.g. “Your site name : Category title”. At this moment there is not possibility to choose the order of the elements, and the “Site Name” is always listed first. However, there are important reasons of SEO to put the “Site Name” at the end of the title.

Therefore, I would ask the developers to include the possibility to choose the order of the elements of that tag. Something as sitenamefirst="1/0" (default:0).

Thanks in advance.

Offline

#2 2012-12-26 03:59:47

phiw13
Plugin Author
From: Japan
Registered: 2004-02-27
Posts: 3,081
Website

Re: Order of informations displayed by <txp:page_title />

I would tend to agree here. I never use that tag for those exact reasons (and had actually forgotten it existed…), and use <txp:title /> instead, nested inside a truckload of conditionals <txp:if_xxx />. Bit of pain to read though.


Where is that emoji for a solar powered submarine when you need it ?
Sand space – admin theme for Textpattern

Offline

#3 2012-12-26 09:01:07

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Order of informations displayed by <txp:page_title />

vote +1

If you want to do it right you’ll need a new admin module/area to manage the page title (Think of page numbers :)

Right now using an individual form for individual needs is the easiest way to manage all the individual if/else needs.

But yes, a simple sitenamefirst="1/0" (default:0) gets my vote.

  • And maybe add page numbers by default to avoid duplicate titles
  • And maybe start the ‘title’ with category:, search:, tag:, section:, …
  • :)

Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#4 2012-12-26 09:48:19

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Order of informations displayed by <txp:page_title />

The page_title tag is pretty dumb on its own. Its real world usability even with sorting is rather limited. Heck, it displays the title based on the requested URL, mostly spouting out just nonsense — stuff that isn’t present on the actual page.

Adding custom functionality to certain tags can fix some issue, but it also adds inconsistencies and makes fluent (on-top-of-your-head) writing of the template language harder.

If this fragment sorting of page_title does happen, the only feasible way would through a sort attribute. Something I do not personally want to add due to it requiring the use of named values instead of named attributes. Named values are baddddd, but so is having a buttload of oddly named attributes.

The use of this sort attribute would be similar, but not really the same at all, to any other sort attribute. E.g.

sort="section, category, title, site_name"

Would display section name first, followed by any category or article title.

Offline

#5 2012-12-26 14:51:25

wet
Developer Emeritus
From: Schoerfling, Austria
Registered: 2005-06-06
Posts: 3,323
Website Mastodon

Re: Order of informations displayed by <txp:page_title />

-1

I assert that we will never get the page title “right” to create a markup aligned with the then-current state of the SEO industry plus personal beliefs and preferences, no matter which attributes we add to the <txp:page_title /> tag.

I for instance prefer “Site name – Site slogan” for the home page of sites and “Article title – Site name” for the inner pages.

This discussion re-appears every few months. Each time I advise to build the page title with a slew of conditionals just the way you deem it most appropriate or “SEO-friendly”. If including this particular snippet from your collection of boilerplate forms is too hard it’s just a few lines of plugin code, and you’re set.

Offline

#6 2012-12-26 15:23:41

pompilos
Member
From: Spain
Registered: 2005-06-07
Posts: 114
Website

Re: Order of informations displayed by <txp:page_title />

Hi, wet. I agree with you: we will never get the perfect page title. Precisely for this reason, it is a good idea to include an attribute “sort”, so that everyone could choose what he prefers or what he thinks is more SEO-friendly.

If “This discussion re-appears every few months”… Well, here you are an evidence that shows that users have a need that is not still covered.

You are right, wet, the same effect can be reached with a form with some conditionals or with some plugin code, but… It is the same with the others tags that include attributes. Attributes have been invented in order to avoid programming to the most of us which are not used to do it. 0:-)

Offline

#7 2012-12-26 16:30:47

Gocom
Developer Emeritus
From: Helsinki, Finland
Registered: 2006-07-14
Posts: 4,533
Website

Re: Order of informations displayed by <txp:page_title />

pompilos wrote:

Precisely for this reason, it is a good idea to include an attribute “sort”, so that everyone could choose what he prefers or what he thinks is more SEO-friendly.

That exactly also the point why Robert is opposing this. You can argue that just sort isn’t enough. For instance the title contains hard-coded values and patterns. So, when I say that I don’t want to see category name in the title, that should be included as an attribute option too? Or that I want to give sections separate page titles, or show slogan on the home page? I also want different separator for the page title and show different components on different contexts.

The page title is essentially just a dumb single purpose widget-like tag. One of the few in Textpattern, unfortunately. These few widget tags shouldn’t really be included in the first place, but what can you do. They are there.

Attributes have been invented in order to avoid programming to the most of us which are not used to do it

Attributes are means to have features. I don’t consider cutting corners when selecting what to include. Otherwise we would be building widgets, not a templating language.

One of the most important things with any attribute is consistency. Something that page_title’s sort attribute wouldn’t really fully fulfill. The sorting would work anything but like sort in other tags. Plus, you need to memorize named values, thing that we should always avoid if possible.

You can easily memorize single attribute shared by all list tags, but try to remember set of values that applies just to one tag’s attribute. There is already butload inconsistencies in Textpattern’s tag and attribute selection, it’s not even funny.

Last edited by Gocom (2012-12-26 16:33:54)

Offline

#8 2012-12-27 09:19:46

merz1
Member
From: Hamburg
Registered: 2006-05-04
Posts: 994
Website

Re: Order of informations displayed by <txp:page_title />

I’m 100% with Gocom and hereby declare my comment above ironic.

But we should have a FAQ section for that dumb tag where all the links to all those reappearing feature requests are collected.


Get all online mentions of Textpattern via OPML subscription: TXP Info Sources: Textpattern RSS feeds as dynamic OPML

Offline

#9 2012-12-27 20:37:06

pompilos
Member
From: Spain
Registered: 2005-06-07
Posts: 114
Website

Re: Order of informations displayed by <txp:page_title />

OK, guys. Let’s forget it.

Offline

Board footer

Powered by FluxBB