Restrict numbers of shown articles

Hello everyone, i got another problem.

This is what i want to do. On an article page i want to show linked articles that have the same keywords from certain groups

Now i got
<BOUCLE_main_article(ARTICLES) {id_article} {doublons}>
    #TITRE
</BOUCLE_main_article>

<BOUCLE_words(MOTS) {id_groupe=1} {id_article}>
    <BOUCLE_linked_articles(ARTICLES) {id_mot}{doublons}>
       #TITRE
    </BOUCLE_linked_articles>
</BOUCLE_words>

this works ok. now i would like to restrict the output to 4 linked articles. how could i do that?

also i dont want to have the main article show among the linked ones, so i put in the doublons criteria. is there another way?
im asking because if i want to do this:

<BOUCLE_words(MOTS) {id_groupe=1} {id_article}>
    <BOUCLE_linked_articles(ARTICLES) {id_mot}{doublons}>
       #TITRE
    </BOUCLE_linked_articles>
    </B_linked_articles>
       no articles with this keyword
    <//B_linked_articles>
</BOUCLE_words>

the "no article with this keyword" is never shown because even i tho do the doublons criteria the loop is not empty - it is just not showing any article.

Thanks in advance
Chris

Christoph Stahl <christoph@...> writes:

Hello everyone, i got another problem.

This is what i want to do. On an article page i want to show linked
articles that have the same keywords from certain groups

Now i got
<BOUCLE_main_article(ARTICLES) {id_article} {doublons}>
    #TITRE
</BOUCLE_main_article>

<BOUCLE_words(MOTS) {id_groupe=1} {id_article}>
    <BOUCLE_linked_articles(ARTICLES) {id_mot}{doublons}>
       #TITRE
    </BOUCLE_linked_articles>
</BOUCLE_words>

you should so something like that:

<BOUCLE_select(MOTS) {id_groupe=1} {doublons}>
<BOUCLE_select_articles(ARTICLES) {id_mots} {exclus} {doublons select} {!par
date} {0,4}> </BOUCLE_select_articles>
</BOUCLE_select>

<BOUCLE_display(ARTICLES) {!doublons select} {0,4} {!par date}>
#TITES
</BOUCLE_display>
no articles with this keyword
<//B_display>

The first "select" loops will go through all the possible articles, selecting at
most 4 per keyword. The loops doesn't display anything, but the ids are "stored"
in the {doublons select}.
The {exclus} criterion is the one excluding the current article. Note that this
should be *inside* your main article loop.

The second "display" loop is used to display the right articles. The special
criterion {!doublons select} will tell the loop to only loop on the articles
stored by the previous {doublons select}. {0,4} and {par date} are the
limiting/sorting criterion that will only show the last 4 articles.

Note that if you change the sorting criterion from the display loop, you should
also change it from the select_articles loop.

this works ok. now i would like to restrict the output to 4 linked
articles. how could i do that?

also i dont want to have the main article show among the linked ones, so
i put in the doublons criteria. is there another way?
im asking because if i want to do this:

<BOUCLE_words(MOTS) {id_groupe=1} {id_article}>
    <BOUCLE_linked_articles(ARTICLES) {id_mot}{doublons}>
       #TITRE
    </BOUCLE_linked_articles>
    </B_linked_articles>
       no articles with this keyword
    <//B_linked_articles>
</BOUCLE_words>

the "no article with this keyword" is never shown because even i tho do
the doublons criteria the loop is not empty - it is just not showing any
article.

the doublons will only work if you also have a doublons criterion on the main
articles loop for the current article. You should use {exclus} instead.

Pierre