rah_sitemap

Published under current TXP projects

A Textpattern plugin to build valid Sitemap.org sitemaps for search engines, including Google, with out hazle. Supports category, section, article and even custom URLs.

Download rah_sitemap v0.4

Image: rah_sitemap

Image: rah_sitemap

List of features

Requirements

Recommended:

Installation and usage

The general behavior stands: paste plugin code to the plugin installer textarea and run the automatic setup. Then just activate the plugin and you are ready to use sitemap interface.

You can locate rah_sitemap’s panel from Textpattern > Extensions > Sitemap. Via that interface you can modify and view the sitemap.

Rah_sitemap version 0.4 included a new feature: permlink settings. With these simple setting you can define the form which URLs in the Sitemap will use. For example, this is a ideal tool for matching the URLs to your own .httaccess rules or a plugin created custom URL rules. If you want to use in-build urls defined by Textpattern itself, you can leave these setting unset. Now to the different permlink types and details.

Article permlinks

These URL settings are used for Articles that appear in the sitemap. To form the URLs you can use any individual article context TXP article tag. These tags include the big names like <txp:permlink />, <txp:posted />, <txp:title />, <txp:category1 />, <txp:category2 />, <txp:section />, <txp:if_article_author />, <txp:if_article_category />, <txp:if_article_id /> and so on.

Example Article permlink URL:

<txp:site_url />sections/<txp:section/>/articles/<txp:article_id />/<txp:article_url_title />
Category permlinks

These URL settings are used for Category links that appear in the sitemap. To form the URLs you can use plain category context TXP tags, including <txp:category /> and <txp:if_category />. Also the plugin provides two extra tagish tags, [type] and [id] which basically output category’s type and id.

Example Category permlink URL:

<txp:site_url />view/category/[id]/<txp:category link="0" title="0" />
Section permlinks

These URL settings are used for Section links that appear in the sitemap. To form the URLs you can use plain section context TXP tags, including <txp:section /> and <txp:if_section />.

<txp:site_url />section/<txp:section />

Optional: Rewrite the sitemap URL

This is truly optional thing, ‘cause this isn’t needed, just somewhat perfectionism. If you don’t like the look of the “messy” dynamic sitemap URL, you can always rewrite it. Remember that mostly only bots will read your Sitemap so the URL rewriting is waste of time, atleast if you have already submitted the sitemap to Google via webmaster tools.

But anyway, to rewrite the URL, put the following code to the top of your root .htaccess (the same that Textpattern uses) file.

RewriteEngine On
RewriteRule ^sitemap.xml.gz?$ ?rah_sitemap=sitemap

Now the sitemap can be accessed by /sitemap.xml.gz.

Changelog

Version 0.4

Version 0.3.2

Version 0.3

Version 0.2

Version 0.1.2

Version 0.1