Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2008-04-09 11:57:42

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

glz_title, SEO friendly page titles

A small, simple plugin that made me experiment a bit with github.com for TXP plugins, Git submodules and the likes.

Expect more Git goodness to come down these forum sooner or later : ).

http://github.com/gerhard/glz_title/tree/master

Requirements

  • minimum TXP 4 (TXP 4.0.6 recommended)
  • without glz_custom_fields you will have trouble…

Usage

txp:glz_title

Simple and straightforward. It builds titles like this: Sitename – Article title. Site slogan.

The interesting part is that this little plugin fetches the title of the article in a list that has one of the
categories set to Section-Article. If under a section we have multiple articles, but one of them we want to use as
master, all we have to do is assign it a Category of “Section-Article”. Obviously, you need to create this category
first.

Oh, and if there is a 404 error, title will show Sitename – error message.

Improvements

If you want to improve on this plugin, by all means, fork it and make it yours :). This plugin has been originally
posted on Github.

Git is a lovely little thing.

Offline

#2 2008-04-09 13:46:25

Walker
Plugin Author
From: Boston, MA
Registered: 2004-02-24
Posts: 592
Website

Re: glz_title, SEO friendly page titles

I <3 git.

Offline

#3 2008-04-09 14:03:21

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_title, SEO friendly page titles

Huh?

Ooooh, you should have mentioned somewhere in brackets, (tilt your head 90&deg; left).

Yeah, me too, it’s totally bonkers!

Last edited by gerhard (2008-04-09 14:05:37)

Offline

#4 2008-04-09 17:49:43

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: glz_title, SEO friendly page titles

Hi Gerard.

What a very interesting plugin!
But I’ve got a problem when I try to use it into my title tage :

Fatal error: Call to undefined function section_title() in /Users/(...)/lib/txplib_misc.php(571) : eval()'d code on line 16

Could you tell me where is the problm?

Tks lot mate.

Best regards,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#5 2008-04-10 12:36:13

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_title, SEO friendly page titles

Hi Patrick,

all is good now, ran a silly replace all that made more changes than I wanted. Give it a go now. ;)

Last edited by gerhard (2008-04-10 12:36:31)

Offline

#6 2008-04-10 13:51:44

Pat64
Plugin Author
From: France
Registered: 2005-12-12
Posts: 1,634
GitHub Twitter

Re: glz_title, SEO friendly page titles

Ok. It works like a charm. Tks Gerard.

Cheers,


Patrick.

Github | CodePen | Codier | Simplr theme | Wait Me: a maintenance theme | [\a mi.ni.ma]: a “Low Tech” simple Blog theme.

Offline

#7 2008-04-10 15:27:16

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: glz_title, SEO friendly page titles

[completely offtopic]
github.com looks so cool, the tagline alone (“no longer a pain in the ass”) makes me want to check it out. is anyone using some sort of versioning for entire textpattern projects? would that even be possible? i guess not, because with txp everything is in the db?
[/completely offtopic]

Offline

#8 2008-04-10 15:47:26

gerhard
Plugin Author
From: London, UK
Registered: 2005-06-29
Posts: 409
Website

Re: glz_title, SEO friendly page titles

Hey Sven, yep, of course you can. I using versioning with all my TXP projects : ).

I have a snippets folder where I save stuff such as pages, forms, articles (when it’s just a handful, not the tens region) etc. Also, Textpattern is a submodule (which I get from here if I want the latest 4.0 release or from here where I have my own little modifications). My branch is totally stable, all experimental stuff is in other branches, none of the them available live as you can see : ).

SVN revolutionized the way I develop (which happened only about a year or so), but Git rocked my world even more.

Oh, and just in case you didn’t come across this…Git repository for TXP 4.0

Last edited by gerhard (2008-04-10 15:53:26)

Offline

#9 2008-04-11 18:59:53

sthmtc
Member
From: CGN, GER
Registered: 2005-01-17
Posts: 586
Website

Re: glz_title, SEO friendly page titles

gerhard wrote:

Hey Sven, yep, of course you can. I using versioning with all my TXP projects : ). I have a snippets folder where I save stuff such as pages, forms, articles (when it’s just a handful, not the tens region) etc.

sorry for hijacking your thread, but could you tell me how you sync your snippets folder with the actual txp install (i.e. the database)?

Offline

Board footer

Powered by FluxBB