Miscellaneous tags · 28.03.04
The <txp:css /> tag
This tag is intended to be used on the head section of our XHTML template, and it will load the css pointed by the attribute n, which must be the name of one of our CSS. If this attribute is not suplied, the default CSS selected for the current section will be used. (The CSS called “default” is used on front page).
So, the n=”“ option in the css tag builder is only useful if you want to override the stylesheet assigned to a section, or if you want to use more than one stylesheet on your page.
The <txp:email /> tag
This tags will show a common email XTHML link, but replacing all your email characters by their hexadecimal equivalents, in order to prevent spam. The attributes we can assign to this tag are:
- email: Your email adresses.
- linktext: The text you want to show for this link.
- title: The title attribute for the link, (that yellow tooltip showed by some links).
The <txp:linklist /> tag
Logically, the mission of this tag is to show a list of your links. Besides the common attributes limit, wraptag and break, it can takes also the next ones:
- form: Form used to format the links.
- category: The category of the links you want to list.
- sort: The sort order. The default value is %(highlight)”linksort”%, that is, the last links you’ve added to TXP. Other possible values are “date desc”, “date asc” and “random()”. [TO-DO: revise with a recent forum post related].
The <txp:sitename /> tag
Put this tag in your document on the place you want to show your Site Name as configured on “Admin>Preferences”.
The <txp:page_title /> tag
This tag will be replaced by your site name, followed by the current article title, if we’re in a single article page. You can select what character(s) will be placed between the one and the other throught the attribute separator.
This tag will output also different titles in function of the page type we’re on:
- In a category page the tag will be replaced by the site name, followed by the given separator, followed by the category name.
- In a search results page, last part of the title will be the value asigned to the key search_results on your language file. (By default, if you’re using the en-gb.txt file, “Search Results”).
- In a comments page the title will include “comments on” before the current article title.
The <txp:output_form /> tag:
The textpattern include mode.
Suppose you have a static page fragment you want to include in more than one of your pages. This fragment can change with the time, and you want all these changes be reflected on all your pages at once.
With output_form you can write that page fragment in a TXP form, and then, place it inside your page templates. Thit fragment will be included in all those pages, in the place you put this tag.
Can takes the attribute form, which indicates the form to display.
The tag can be used recursively, it’s to say, you can place this tag inside another form, and then put a the same tag pointing to the new form in another one, and so on…
Specially recommended for page headers, footers, navigation bars and almost any component repeated on your templates.
The <txp:password_protect /> tag
You can use this tag to protect some pages of your site – with HTTP_AUTH – in order to make them visibles only for people who know the required username and password. These are specified to the tag using the attributes login with the required username as value and pass, which is, of course, the password.
The <txp:site_slogan /> tag
Put this tag in your document on the place you want to show your Site Slogan as configured on “Admin>Preferences”.
* * *

Observations?
Habrá que añadir que este tag se puede usar recursivamente osea un form puede llamar a otro form y así.
¡¡Excelente trabajo!!
— hdanniel 1 04 2004 - 03:12 #
Thanks to you for the feedback.
Ah!, I’ve edited the comment to clear the accents messy. I have to configure textile and my server to properly display non UTF-8 chars.
— kusor 2 04 2004 - 00:33 #
commenting closed for this article