Displaying items with a specific keyword

This loop lets your site display items (section, article, news, ...) according to their attached keyword(s).
<BOUCLE_keyword (ARTICLES) {titre_mot=display} >
<a href="#URL_ARTICLE">#TITRE</a>
</BOUCLE_keyword>

How does it work?

-  Spip.net’s documentation on keywords.

-  One can easily replace ARTICLES with RUBRIQUES, BREVES or SITES depending on what you wish to display. If doing so, just adapt the content of “href” destination (#URL_RUBRIQUE, #URL_BREVE et #URL_SITE).

-  The keyword used in this example is ’display’. You can easily replace it by another one of your choice. When so doing, make sure not to have two or more keywords with the same name (’titre’) in two or more different keyword groups, unless you are intending to include the items marked by all of them.

-  If you liked this, you might read this article: Excluding items with a particular keyword

Originally posted by Olivier GENDRIN. Translated from French by Etienne B. ( loiseau2nuit [AT] no-log.org )

updated on 22 January 2007

Discussion

Aucune discussion

Comment on this article

Who are you?
  • [Log in]

To show your avatar with your message, register it first on gravatar.com (free et painless) and don’t forget to indicate your Email addresse here.

Enter your comment here

This form accepts SPIP shortcuts {{bold}} {italic} -*list [text->url] <quote> <code> and HTML code <q> <del> <ins>. To create paragraphs, just leave empty lines.

Add a document

Follow the comments: RSS 2.0 | Atom