Displaying the most recent articles per section from your editors

By default, SPIP proposes an author’s page which enables you to reveal the list of authors/editors who participate to your site, as well as their most recent contributions.

But a problem might arise if you have numerous contributing editors who actively participate on a frequent basis on your site. This would result in an over-extended page of articles.

However, there is a method of listing the most recent contributions of your authors/editors and to do so for each of them in turn.

How do we proceed?

First off, we’ll create a file:

myauthor.html

Creating the myauthor.html file

Within the file, insert the following code:

-  Just after the <body> tag, insert

<BOUCLE_principale(AUTEURS){id_auteur}{unique}>

-  Just before the </body> tag, insert

</BOUCLE_principale>

-  In the HTML body of the page, we present below two code segments that you can insert within those HTML body tags (We can not directly specify a section, since generally speaking an author is not associated with just one section, but only to the articles that he/she has written, so the code may seem a little tortured but it does allow us to find out the section relevant to the article(s)):

Code for the most recent article

<B_appel_article>

The most recent article written by <BOUCLE_nom_auteur(AUTEURS){id_auteur}>[(#NOM)]</BOUCLE_nom_auteur><br>

<BOUCLE_appel_article(ARTICLES){id_auteur}>
	<BOUCLE_appel_rubrique_article(RUBRIQUES){id_rubrique}{par titre}{doublons}>
		[(#TITRE|majuscules)]
		<ul>
		<BOUCLE_rappel_article(ARTICLES){id_rubrique}{par date}{inverse}{doublons}{0,15}>
		    <li><a href="#URL_ARTICLE">[(#TITRE)<br></a>]
		</BOUCLE_rappel_article>		
		</ul>
	</BOUCLE_appel_rubrique_article>	
</BOUCLE_appel_article>
</B_appel_article>

So far, this author has not written any articles

<//B_appel_article>

Code for an article chosen at random

<B_appel_article>

The most recent article written by <BOUCLE_nom_auteur(AUTEURS){id_auteur}>[(#NOM)]</BOUCLE_nom_auteur><br>

<BOUCLE_appel_article(ARTICLES){id_auteur}>
	<BOUCLE_appel_rubrique_article(RUBRIQUES){id_rubrique}{par titre}{doublons}>
		[(#TITRE|majuscules)]
		<ul>
		<BOUCLE_rappel_article(ARTICLES){id_rubrique}{par hasard}{doublons}{0,15}>
		    <li><a href="#URL_ARTICLE">[(#TITRE)<br></a>]
		</BOUCLE_rappel_article>		
		</ul>
	</BOUCLE_appel_rubrique_article>	
</BOUCLE_appel_article>
</B_appel_article>

So far, this author has not written any articles

<//B_appel_article>

And finally

Now you need to configure your authors page (the one that lists all of your various authors) so that when you click on the author link, you will be directed to the myauthor page which lists the most recent articles written by that particular author.

The link should be coded as shown below:

<a href="#URL_PAGE{myauthor, id_auteur=#ID_AUTEUR}">name of the link</a>

Author Mark Published : Updated : 29/06/23

Translations : català, English, Español, français, italiano, Nederlands