Another question...

Sorry, but got another question:

I have now used following code to generate a list of an authors
contributions:

<BOUCLE_authors(AUTEURS){id_article}>
  <BOUCLE_other_articles(ARTICLES){id_auteur}{doublons}>
           <a href="article.php3?id_article=#ID_ARTICLE">#TITRE</a><br>
      </BOUCLE_other_articles>
</BOUCLE_authors>

(*Thanks, Arno!)

How do I sort the list according to the existing "rubriques"? What I
would like is something like this:

Rubrique 1
  TITRE 1
  TITRE 2
  ...

Rubrique 2
  TITRE 1
  TITRE 2
  ...

(Boy, am I in need of an english doc or what? :-))

Best regards,

Hi-Young Kim wrote:

I have now used following code to generate a list of an authors
contributions:

<BOUCLE_authors(AUTEURS){id_article}>
        <BOUCLE_other_articles(ARTICLES){id_auteur}{doublons}>
           <a href="article.php3?id_article=#ID_ARTICLE">#TITRE</a><br>
      </BOUCLE_other_articles>
</BOUCLE_authors>

(*Thanks, Arno!)

How do I sort the list according to the existing "rubriques"? What I
would like is something like this:

Rubrique 1
        TITRE 1

Well, erm, sorry, it's impossible with the current SPIP language ;))))
There are two problems for this :

- we should be able to select, in a single "boucle", articles which
are written by _any_ author of the current article, not only by _one_
of them. The SPIP language cannot, which forces you to use two contained
loops (cf. your example) instead of only one loop.

- we should be able to group results of a loop according to a given
parameter (for example id_rubrique, or (even trickier!) the title
of the rubrique), and write separator texts between these groups.
The SPIP language cannot - the most difficult being probably to
find an acceptable (i.e. simple) syntax to do the "group" thing ;))

Yours

Antoine.

Re,

Hi-Young Kim wrote:

<BOUCLE_authors(AUTEURS){id_article}>
        <BOUCLE_other_articles(ARTICLES){id_auteur}{doublons}>
           <a href="article.php3?id_article=#ID_ARTICLE">#TITRE</a><br>
      </BOUCLE_other_articles>
</BOUCLE_authors>

By the way, you'd better use "#URL_ARTICLE" instead
of "article.php3?id_article=#ID_ARTICLE". That way,
if you want to change the way URLs are generated (e.g.
you write a set of rewrite-rules that maps user-friendly
URLs), it can be handled transparently in the template
files.

ciao

Antoine.