To sort articles alphabetically, except one which should be displayed first

Let us suppose that you want to list a series of articles alphabetically, except the prologue which you want to display at the beginning of the list...

There is an easy way to deceive the sorting carried out by SPIP: you just have to add a space at the beginning of the article’s title (for example, change "Prologue" to " Prologue". This will sort the prologue title before the others and will display it first. However the additional space in the title will be ignored by the web browser and will not cause any variation to the page layout.

Note: this trick will only work if you use an alphabetical sorting on article titles, by using the following sort criterion on the loop {par titre}). It won’t work for any other sort order.

Note: this also applies to sections, news items, referenced sites, etc.

Author Paul Knight Published : Updated : 26/10/12

Translations : català, English, Español, français, italiano, Nederlands, Türkçe