SPIP

[ar] [bg] [ca] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [sv] [tr] [vi] [zh] Espace de traduction

Download the latest version of SPIP

SPIP 1.9.2 SPIP 1.9.2

Highlighting an item in a list

April 2004 — updated : September 2005

All the versions of this article:


SPIP 1.8.2 introduced the #EXPOSE tag. It lets you highlight the main object of the current web page, in either a menu or in a list.

With this tag it is easy to change the way the title of the main article is displayed. For example, you can change the style sheet for the link in the article.html template:

with the following styles:

The object which is highlighted by the difference in display is the article, news item, keyword, or author belonging to the current “context”. In the case of sections, the whole path, from the site root to the current section, is taken into account, enabling the section containing the displayed article to be highlighted within the context of the whole hierarchy tree.

By default, SPIP replaces the #EXPOSE tag by “on” if the object corresponds to the context — if it doesn’t the tag is simply ignored. However, one, or two, arguments can be added to the #EXPOSE tag, making it possible to specify how the highlighted article is to be displayed differently from the others. So [(#EXPOSE{yes,no})] will display "yes" on the highlighted article, and "no" on the others.

It is also possible to disable the link on the highlighted article:

will generate the following HTML code:

which will be displayed in this way:

All about my sister
All about me
All about my brother

 

Note:
This feature was introduced with SPIP 1.7.1 using the #EXPOSER tag.
The syntax of this tag was as follows:
[(#EXPOSER|yes,no)]
This notation is now deprecated. Use #EXPOSE instead, whose syntax is more in line with that of all other SPIP tags.


ٍShow the template of this page Site created with SPIP | Translation area | Private area