Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-08-29 08:14:58

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Page Title order?

I’ve been meaning to ask about this for a while now. Would it be possible to allow for page title sort ordering in a future version?

Instead of having “Site Name – Article Title” I’d really like to have “Article Title – Site Name”.

I know this is possible a few different ways, but having a simple order=1,2 in the <txp:page_title /> would be fantastic.

Thoughts?

Offline

#2 2008-08-29 10:05:35

ruud
Developer Emeritus
From: a galaxy far far away
Registered: 2006-06-04
Posts: 5,068
Website

Re: Page Title order?

Simply using the <txp:title /> and <txp:site_name /> tags instead of <txp_page_title /> is easier to understand.

Offline

#3 2008-08-29 12:15:10

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: Page Title order?

Of course, but then you have to use a whole bunch of if’s to get it to work on the homepage and in sections.

<txp:page_title /> works across all three:

  • Homepage: Site Name
  • Sub-page: Site Name – Page Title
  • Section : Site Name – Section Title

Using <txp:title /> & <txp:site_name /> would require something like this no?

<txp:if_section name=",">
	<title>
		<txp:if_individual_article>
			<txp:title /> - <txp:site_name />
		</txp:if_individual_article>
		<txp:if_article_list>
			<txp:site_name />
		</txp:if_article_list>
	</title>
</txp:if_section>
<txp:if_section name="archive">
	<title>Archive - <txp:site_name /></title>
</txp:if_section>
<txp:if_section name="contact">
	<title>Contact - <txp:site_name /></title>
</txp:if_section>
Or is there an easier way to manage that?

Offline

#4 2008-08-29 12:18:20

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

Re: Page Title order?

Offline

#5 2008-08-29 12:21:04

Sam
Member
From: New York City
Registered: 2004-06-26
Posts: 127
Website

Re: Page Title order?

Smashing! I stupidly didn’t even check to see if a plugin did this. Thanks wet!

Offline

Board footer

Powered by FluxBB