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:

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:

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:

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?

  1. Se puede usar para colocar un pedazo de código creado previamente como un form. Esto es útil para hacer “secciones” (no en el sentido que le da TxP) de navegación, menus, cabeceras, pie de páginas, etc, de tal manera que solo tengamos un código para éstas “secciones” que podremos incluir en cualquiera de nuestras páginas.
    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    #
  2. Ok, modification added.
    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

« Article Navigation Tags | Displayed Comments »