Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
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
Offline
Offline
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
Offline
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
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
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
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