[ar] [ast] [bg] [br] [ca] [co] [cpf] [cs] [da] [de] [en] [eo] [es] [eu] [fa] [fon] [fr] [gl] [id] [it] [ja] [lb] [nl] [oc] [pl] [pt] [ro] [ru] [sk] [sv] [tr] [uk] [vi] [zh] Espace de traduction



August 2010

All the versions of this article:

#DOUBLONS{keywords} or #DOUBLONS{keywords,family} outputs the status of the duplicates tagged with (KEYWORDS) at this location in the code, in the form of an array of id_mot values: array(1,2,3,...)

#DOUBLONS just by itself generates the raw list of all the duplicates.

#DOUBLONS*{keywords} generates the raw text string: ",1,2,3,..." (which will change if the management of the duplicates changes)

For duplicates which are "named" (e.g. <BOUCLE_b(ARTICLES){id_article>100}{doublons A}>) we can use:
#DOUBLONS{articles, A} to see the array of id_articles that have been "named" with the ’A’ family descriptor.

To pass duplicates arrays to an INCLURE, we would write:
#INCLURE{fond=snippet, env, doublons=#DOUBLONS{articles, A}} for an array named{doublons A} within a BOUCLE(ARTICLES)
and #INCLURE{fond=snippet, env, doublons} for all the arrays of duplicates declared in the calling template (that occur before the call to the INCLURE).

To retrieve an array of doublon duplicates from an INCLURE, it is recommended that that INCLURE code only return #DOUBLONS*{articles, B} and then, in the calling template file, to use #SET{ret, #INCLURE{fond=snippet, env, doublons}|explode{','}}: the #GET{ret} that is generated can then be used within the criteria of a loop: ({id_article IN #GET{ret}}).

Show the template of this page Site powered by SPIP | Translation area | Private area