What I would like to have is a link under an article directing the users
to other articles published by the same author. The above code works
when I define which author SPIP should generate a list for. Can this
been done automatically depending on the id_autuer for each article?
Yes, of course.
Something like:
<BOUCLE_main_article{id_article}{doublons}>
#TITRE
#TEXTE...
<BOUCLE_authors{id_article}>
-> #NOM
<BOUCLE_other_articles{id_auteur}{doublons}>
#TITRE
</BOUCLE_other_articles>
</BOUCLE_authors>
</BOUCLE_main_article>
The loop "main_article" is the main loop for your page. It retrieves the article with "id_article" passed in the URL, and show the title and the main body of the article (#TITRE and #TEXTE); add whatever is needed (#SURTITRE...).
In this loop, somewhere in the page, le loop "authors" shows the name of the authors of the article (as this loop depends on "id_article"). Lets just show the authors names (of course, you can create a link with their email).
In the authors loop (so that it's executed for each author), the loop "other_articles" shows every articles by this auther (as it depends on "id_auteur"). Of course, you could restrict this list to the most recent articles.
The only subtle thing is the use of "doublons", so articles cannot be selected more than one time. In "main_article", the main article is selected and, because of "doublons", will not be shown again (in another "doublons" loop). In "other articles", because of the "doublons", not only the "main article" will not be shown again, but also the articles of each author will be shown only once (if some authrs have written some articles together, these articles will appear only for 1 author, this way you will avoid multiple links to a same page).
ARNO*
--
Le Scarabée : http://www.scarabee.com
uZine 2 : http://www.minirezo.net
DH/DSS, 0x11930F0B, DEEB 602D B344 644B AF88 BF73 85F4 2297 1193 0F0B