Skip navigation.

exploreopera

| Help

Sign up | Help

SPIP commits

Posts tagged with "criterion"

! INCLURE and {doublons}

, , ,

{doublons} arrays can be transmitted to included templates. #ENV can also transmit them.

These sentences are corrects :
[(#INCLURE{fond=toto}{doublons})]
<INCLURE{fond=toto}{doublons} />
spip.php?page=article&id_article=3&doublons[articles]=1,2,89,12&doublons[documents]=15,12

Note that the {doublons} are transmitted from the main template to the included one. But it's not possible to transmit the information from the included template : Especially <INCLURE /> isn't always calculated at the same time that the main template - For this reason and to keep a coherent behavior, #INCLURE keeps the same restriction for {doublons}

Example :
-------------

 <INCLURE(other_template.html){delais=0}{doublons} />
 other_template.html : 
 BOUCLE(ARTICLES){doublons}{par hasard}{0,1}

Every hit to the main template (generally cached) returns a random article that hasn't been manipulated before.


commit : http://trac.rezo.net/trac/spip/changeset/11390
announce : http://thread.gmane.org/gmane.comp.web.spip.devel/46926

[11355] overwrite a criterion for a specific loop only

, ,

For exemple critere_AUTEURS_recherche_dist() will overwrite the criterion recherche for the loops over AUTEURS. The priority order is :
  1. critere_TABLE_nomcrit
  2. critere_TABLE_nomcrit_dist
  3. critere_nomcrit
  4. critere_nomcrit_dist