Pixelpost

Authentic Photoblog Flavour

Smart Title Addon v0.1β

 
Download (2 KB)

Developer Description

Ever wanted to use a header.html for your template, but don't want the <title> to be static? That was my situation, so I created STA to take care of the title for me. The end result: a stripped title containing only the most essential stuff.

Features

  • When the user visits the index page, the title is site title - sub title. If your sub title is empty, only site title is used.
  • When the user browses a category, the category name is used.
  • When the user browses a tag, the tag name is used.
  • When the user is looking at a photo, the title of that photo is used.
  • When the user stops on the browse page itself, the title is 'Browse site title'. The same goes for a page called album, if you have one.

Template Tags

<SMA_TITLE> - The final title, as described above.
<SMA_TITLE_EXTRA> - Same, but with site title always added at the end (if not present already).

Use it

  1. Put smart_title_addon.php in your addons folder.
  2. Go to your admin panel and activate Smart Title Addon.
  3. Put one of the template tags above between <title> and </title> in your template file(s). This is of most interest if you use a header.html file in your template. You get the advantage of having your main navigation etc in just one file, but without the drawback of a static title on all pages.

What it doesn't

If STA doesn't understand what page the user is viewing, the title becomes the default (same as on index page). This addon is still in an early stage of its life, so it doesn't understand multiple categories. Neither does it support multiple languages, and the word "Browse" is hard coded and thus not changed depending of your selected language. However, you are most welcome to improve this addon to support more types of browsing a Pixelpost site, or other languages, or other plugins.

Have you downloaded and installed this addon?

Be the first person to write a review!