rah_css_parse

Published under current TXP projects

The plugin parses Textpattern’s <txp: /> tags in style sheet.

Download rah_css_parse v0.1

Image: rah_css_parse

Image: rah_css_parse

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 new tags that plugin includes like others.

For usage, basically just use <txp:rah_css_parse />-tag like the default core <txp:css />: put it inside sites head with wanted name-attribute. The tag will output the link element pointing to the style sheet.

Note and known

Please note that style sheets are not provided within the article nor section context. Thus, you can not use article, section nor category based tags inside style sheets. If you do use context tags outside their own context, you get errors and unwanted output. Just to keep in mind.

Attributes

The tag is <txp:rah_css_parse />. The tag outputs a link-element. Attributes follow.

name
Name of the stylesheet.
Example: name="mystyle" Default: "default"

media
Media property of the link attribute.
Example: media="all" Default: "screen"

type
Style element’s type attribute.
Example: type="" Default: "text/css"

title
XHTML title. Default is unset.
Example: title="Default style" Default: ""

rel
Style element’s rel attribute.
Example: rel="stylesheet" Default: "stylesheet"

Example

Code:

<txp:rah_css_parse name="mystyle" />

Returns:

<link rel="stylesheet" type="text/css" media="screen" href="http://example.com/?rah_css_parse=mystyle" />

Changelog

Version 0.1