SPIP

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

Download
Home > English documentation > Webmasters > A few examples of loops > A drop-down list for presenting a list of articles

A drop-down list for presenting a list of articles

January 2004

All the versions of this article:


It is easy to make a drop-down list in an HTML form which gives instant access to the selected article.

If the URLs of the site’s articles are in the form article.php3?id_article=123, the following code will do the trick:

The criteria of the loop can be changed according to your needs. In the example given the articles of the current section will be shown, sorted by title.

This method can be used just as well to present lists of news items or sections. It could even be used to show the complete list of items in the site.


Show the template of this page Site powered by SPIP | Translation area | Private area