From SPIP 3.2 it has been possible to sort the documents linked to an object by simply dragging and dropping them.
By default, no sorting order is defined. It becomes defined as soon as a document is moved. As soon as a sorting order is defined, a "Reset order" button is displayed at the bottom of the table of linked documents and/or illustrations.
To display the elements of a DOCUMENTS
loop in the order thus defined, use the {par rang_lien}
criterion, as in the example below:
<BOUCLE_docs(DOCUMENTS){id_article}{par rang_lien, num titre, titre}>
[(#LOGO_DOCUMENT|image_reduire{200})]
</BOUCLE_docs>
Technically, the sorting order is stored in a rang_lien
field of the spip_documents_liens
table.
See also
- Criterion par ...
- Criteria applicable to all loops