Martin Švihla

web pages / martin_svihla (at) yahoo (dot) com

Textpattern plugins

These plugins add a small piece of functionality to the content management system called Textpattern.

msv_show_article_field

Usage

The _msv_show_article_field_ is a single tag. Textpattern will replace this tag with value of a specified database field from db table 'textpattern'. The tag is applicable in article form.

Attributes

Examples

Display _url_title_ of a current article:
<txp:msv_show_article_field name="url_title" />

Download

msv_show_article_field.txt

txp:msv_link

Usage

The msv_link is a single tag extending txp:link with attributes. The main idea was to add target attribute but then I decided to open the tag for all attributes.

Attributes

Any attribute is allowed (except href, which is suplied from a database) so be careful what you use there.
Common attributes for <a> are: target, style, class, rel, rev...

Examples

<txp:msv_link target="_blank" class="mylinkstyle" rel="alternate" />

Download

msv_links.txt

msv_if_custom_article_date

Classification

The msv_if_custom_article_date tag is a Conditional Tag, and therefore a Container Tag, as all conditional tags are container tags. The tag will execute the contained statement if a date set in a specified custom field is greater/less/greaterequal/lessequal/equal/notequal compared to a date set in the tag.

Syntax

The tag has the following syntactic structure:
<txp:msv_if_custom_article_date> ...your content here... </txp:msv_if_custom_article_date>

Attributes

Other notes

Examples

Classical 'publish until date' condition
The article will be published until date specified in the custom field number 4 (date in format 'dd.mm.yyyy').
<txp:msv_if_custom_article_date is="greaterequal" customfield="4"> ArticleContent </txp:msv_if_custom_article_date>

More complicated example
The _Content_ will be published if date specified in the custom field number 1 (date in format 'dd-mm-yyyy') is less than 11th November 2006 (date in format 'dd-mm-yyyy').
<txp:msv_if_custom_article_date is="less" customfield="1" dateseparator="-" date="11-11-2006"> Content </txp:msv_if_custom_article_date>

Download

msv_if_custom_article_date.txt