{doublons} in different files

Hi

If I have two includes, say "list_1" and "list_2" as files "list_1.html" and "list_2.html", resp., both called in a file "list.html" as follows.

<!-- from list.html -->
[(#INCLURE{fond=list_1})]
[(#INCLURE{fond=list_2})]

Both list could contain a few identical articles. How to avoid in this situation the repitition of articles?

This, of course, doesn't do the job:

<!-- from list_1.html -->
<BOUCLE_list_1 (ARTICLES) {doublons}>

<!-- from list_2.html -->
<BOUCLE_list_2 (ARTICLES) {doublons}>

What does the job?

Thanks for any help.

Hi,

it’s difficult to share calculated values (like {boublons}, #SET, etc.) between included templates.
And using #INCLURE instead of make it worse because it includes a static code.

The documentation gives other details concerning your problem :
http://www.spip.net/en_article2430.html

"There is also a loop criteria called {doublons}. Because if we use an <INCLURE> within a template file, the memorised duplicates are not automatically transmitted down to the included template code.

Since SPIP 2.0, it has been possible to overcome this problem. To do so, just add the{doublons} parameter to your call of the template file to be included. For example<INCLURE{fond=mypage, doublons}>.

Note, however, that the duplicates selected in the included template will not « feed back » into the calling template file."

This lack of feed-back makes impossible to use too separate inclusions.

The only solution I see is to have the first included element directly in the main template. This would gives something like

<BOUCLE_list_1(ARTICLES){…}{doublons}>…</BOUCLE_a>
<INCLURE{fond=list_2,doublons}>

Hope it helps,

.Gilles

On Tue, Dec 25, 2012 at 8:23 PM, Ульрих <uhfmb@mail.ru> wrote:

Hi

If I have two includes, say « list_1 » and « list_2 » as files « list_1.html » and « list_2.html », resp., both called in a file « list.html » as follows.

[(#INCLURE{fond=list_1})]
[(#INCLURE{fond=list_2})]

Both list could contain a few identical articles. How to avoid in this situation the repitition of articles?

This, of course, doesn’t do the job:

<BOUCLE_list_1 (ARTICLES) {doublons}>

<BOUCLE_list_2 (ARTICLES) {doublons}>

What does the job?

Thanks for any help.


spip-en@rezo.net - http://listes.rezo.net/mailman/listinfo/spip-en

Le 26/12/2012 22:19, Gilles Vincent a écrit :

The only solution I see is to have the first included element directly in the main template. This would gives something like

<BOUCLE_list_1(ARTICLES){..}{doublons}>..</BOUCLE_a>
<INCLURE{fond=list_2,doublons}>

Without changing the contexte of the first include,
you can separately compute the first doublons first with an space producing loop,
and inject them in the second includes :
<BOUCLE_compute_doublons_first_include (ARTICLES){criteres for first include}{doublons}> </BOUCLE_compute_doublons>
<INCLURE{fond=list_1}>
<INCLURE{fond=list_2,doublons}>

JLuc

---

On Tue, Dec 25, 2012 at 8:23 PM, Ульрих <uhfmb@mail.ru <mailto:uhfmb@mail.ru>>
wrote:

    Hi

    If I have two includes, say "list_1" and "list_2" as files "list_1.html" and "list_2.html", resp., both called in a
    file "list.html" as follows.

        <!-- from list.html -->
        [(#INCLURE{fond=list_1})]
        [(#INCLURE{fond=list_2})]

    Both list could contain a few identical articles. How to avoid in this situation the repitition of articles?

    This, of course, doesn't do the job:

        <!-- from list_1.html -->
        <BOUCLE_list_1 (ARTICLES) {doublons}>

        <!-- from list_2.html -->
        <BOUCLE_list_2 (ARTICLES) {doublons}>

    What does the job?

    Thanks for any help.

    _________________________________________________
    spip-en@rezo.net <mailto:spip-en@rezo.net> -
    http://listes.rezo.net/__mailman/listinfo/spip-en <http://listes.rezo.net/mailman/listinfo/spip-en>