mixed article/rubrique boucle

hey,
i know i once found a boucle that let me do the following: list all rubriques except for if a rubrique only contains one article it lists the article instead of the rubrique. does anyone have an idea where to find this? i used it once but have no back-up… (me stupid of course)
thank you
stijn

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882

anyone?
stijn

Op 18-jun-06, om 22:20 heeft {mozna} het volgende geschreven:

hey,
i know i once found a boucle that let me do the following: list all rubriques except for if a rubrique only contains one article it lists the article instead of the rubrique. does anyone have an idea where to find this? i used it once but have no back-up… (me stupid of course)
thank you
stijn

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882


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

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882

something like this.

<BOUCLE_rubriques(RUBRIQUES){racine}>
<BOUCLE_articles(ARTICLES){id_rubrique}>

<?php $url= '[(#TITRE|texte_script)]
'; ?>

</BOUCLE_articles>

<?php $total = #TOTAL_BOUCLE; if($total==1){ echo $url; ?> <?php }else{ ?>

#_rubriques:TITRE

<?php } ?>

</B_articles>
</BOUCLE_rubriques>

Good luck
Martin

2006/6/19, {mozna} <info@mozna.be>:

anyone?
stijn

Op 18-jun-06, om 22:20 heeft {mozna} het volgende geschreven:

hey,
i know i once found a boucle that let me do the following: list all rubriques except for if a rubrique only contains one article it lists the article instead of the rubrique. does anyone have an idea where to find this? i used it once but have no back-up… (me stupid of course)
thank you
stijn

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882


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

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882


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

Here is an adaptation of the solution of Martín :

<BOUCLE_rubriques(RUBRIQUES){racine}>
<BOUCLE_severalarticles(ARTICLES){id_rubrique}{1,2}>
</BOUCLE_severalarticles>
      <a href="#_rubriques:URL_RUBRIQUE">#_rubriques:TITRE</a><br/>
</B_severalarticles>
     <BOUCLE_onearticle(ARTICLES){id_rubrique}>
     <a href="[(#URL_ARTICLE|texte_script)]">[(#TITRE|texte_script)]</a><br/>
     </BOUCLE_onearticle>
</B_severalarticles>
</BOUCLE_rubriques>

There is one more loop, but your page is in cache.

.Gilles
--
2006/6/20, Martín Gaitan <gaitan@gmail.com>:

something like this.

<BOUCLE_rubriques(RUBRIQUES){racine}>
<BOUCLE_articles(ARTICLES){id_rubrique}>
<?php
$url= '<a
href=\"[(#URL_ARTICLE|texte_script)]\">[(#TITRE|texte_script)]</a><br/>';
?>
</BOUCLE_articles>
<?php
$total = #TOTAL_BOUCLE;
if($total==1){

echo $url; ?>

<?php }else{ ?>
<a
href="#_rubriques:URL_RUBRIQUE">#_rubriques:TITRE</a><br/>
<?php } ?>

</B_articles>
</BOUCLE_rubriques>

Good luck
Martin

2006/6/19, {mozna} <info@mozna.be>:
>
> anyone?
> stijn
>
> Op 18-jun-06, om 22:20 heeft {mozna} het volgende geschreven:
>
> hey,
> i know i once found a boucle that let me do the following: list all
rubriques except for if a rubrique only contains one article it lists the
article instead of the rubrique. does anyone have an idea where to find
this? i used it once but have no back-up... (me stupid of course)
> thank you
> stijn
>
> mozna grafische vormgeving
> d. mellaertsstraat 30 3010 kessel-lo
> 016 64 09 80 www.mozna.be
> gsm:0484 974 882
>
> _______________________________________________
> spip-en@rezo.net -
http://listes.rezo.net/mailman/listinfo/spip-en
>
> mozna grafische vormgeving
> d. mellaertsstraat 30 3010 kessel-lo
> 016 64 09 80 www.mozna.be
> gsm:0484 974 882
>
> _______________________________________________
> spip-en@rezo.net -
http://listes.rezo.net/mailman/listinfo/spip-en
>

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

whit this code I get a list of articles of any section without a link to this (the section) if there is only one article.

put it here and try: http://www.spip-es.net/probador.php

bye.

2006/6/20, Gilles Vincent <gilles.vincent@gmail.com>:

Here is an adaptation of the solution of Martín :

<BOUCLE_rubriques(RUBRIQUES){racine}>
<BOUCLE_severalarticles(ARTICLES){id_rubrique}{1,2}>
</BOUCLE_severalarticles>
#_rubriques:TITRE

</B_severalarticles>
<BOUCLE_onearticle(ARTICLES){id_rubrique}>
[(#TITRE|texte_script)]

</BOUCLE_onearticle>
</B_severalarticles>
</BOUCLE_rubriques>

There is one more loop, but your page is in cache.

.Gilles

2006/6/20, Martín Gaitan <gaitan@gmail.com >:

something like this.

<BOUCLE_rubriques(RUBRIQUES){racine}>
<BOUCLE_articles(ARTICLES){id_rubrique}>

<?php $url= '[(#TITRE|texte_script)]
'; ?>

</BOUCLE_articles>

<?php $total = #TOTAL_BOUCLE; if($total==1){ echo $url; ?> <?php }else{ ?>

#_rubriques:TITRE

<?php } ?>

</B_articles>
</BOUCLE_rubriques>

Good luck
Martin

2006/6/19, {mozna} <info@mozna.be >:

anyone?
stijn

Op 18-jun-06, om 22:20 heeft {mozna} het volgende geschreven:

hey,
i know i once found a boucle that let me do the following: list all
rubriques except for if a rubrique only contains one article it lists the
article instead of the rubrique. does anyone have an idea where to find
this? i used it once but have no back-up… (me stupid of course)
thank you
stijn

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882


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

mozna grafische vormgeving
d. mellaertsstraat 30 3010 kessel-lo
016 64 09 80 www.mozna.be
gsm:0484 974 882


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


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

i found it:

<BOUCLE_Rubriques(RUBRIQUES){id_parent=0} {par num titre} >
<BOUCLE_articles_plusdun(ARTICLES) {id_rubrique} {1,1}>
<a href=« [(#URL_RUBRIQUE)] »[ title=(#_Rubriques:DESCRIPTIF|attribut_html)]>

  • [(#_Rubriques:TITRE|supprimer_numero)]

  • </BOUCLE_articles_plusdun>
    <BOUCLE_articles_unseul(ARTICLES) {id_rubrique} {0,1}>
    <a href=« [(#URL_ARTICLE)] »[ title=(#_Rubriques:DESCRIPTIF|attribut_html)]>
  • [(#_Rubriques:TITRE|supprimer_numero)]

  • </BOUCLE_articles_unseul>
    <a href=« [(#URL_RUBRIQUE)] »[ title=(#_Rubriques:DESCRIPTIF|attribut_html)]>
  • [(#_Rubriques:TITRE|supprimer_numero)]

  • <//B_articles_unseul>
    <//B_articles_plusdun>
    </BOUCLE_Rubriques>

    maybe the other solutions work as well. this one works all right for me.
    thank you very much
    stijn

    Op 20-jun-06, om 11:32 heeft Martín Gaitan het volgende geschreven:

    whit this code I get a list of articles of any section without a link to this (the section) if there is only one article.

    put it here and try: http://www.spip-es.net/probador.php

    bye.

    2006/6/20, Gilles Vincent <gilles.vincent@gmail.com>:

    Here is an adaptation of the solution of Martín :

    <BOUCLE_rubriques(RUBRIQUES){racine}>
    <BOUCLE_severalarticles(ARTICLES){id_rubrique}{1,2}>
    </BOUCLE_severalarticles>
    #_rubriques:TITRE

    </B_severalarticles>
    <BOUCLE_onearticle(ARTICLES){id_rubrique}>
    [(#TITRE|texte_script)]

    </BOUCLE_onearticle>
    </B_severalarticles>
    </BOUCLE_rubriques>

    There is one more loop, but your page is in cache.

    .Gilles

    2006/6/20, Martín Gaitan <gaitan@gmail.com >:

    something like this.

    <BOUCLE_rubriques(RUBRIQUES){racine}>
    <BOUCLE_articles(ARTICLES){id_rubrique}>

    <?php $url= '[(#TITRE|texte_script)]
    '; ?>

    </BOUCLE_articles>

    <?php $total = #TOTAL_BOUCLE; if($total==1){ echo $url; ?> <?php }else{ ?>

    #_rubriques:TITRE

    <?php } ?>

    </B_articles>
    </BOUCLE_rubriques>

    Good luck
    Martin

    2006/6/19, {mozna} <info@mozna.be >:

    anyone?
    stijn

    Op 18-jun-06, om 22:20 heeft {mozna} het volgende geschreven:

    hey,
    i know i once found a boucle that let me do the following: list all
    rubriques except for if a rubrique only contains one article it lists the
    article instead of the rubrique. does anyone have an idea where to find
    this? i used it once but have no back-up… (me stupid of course)
    thank you
    stijn

    mozna grafische vormgeving
    d. mellaertsstraat 30 3010 kessel-lo
    016 64 09 80 www.mozna.be
    gsm:0484 974 882


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

    mozna grafische vormgeving
    d. mellaertsstraat 30 3010 kessel-lo
    016 64 09 80 www.mozna.be
    gsm:0484 974 882


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


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

    mozna grafische vormgeving
    d. mellaertsstraat 30 3010 kessel-lo
    016 64 09 80 www.mozna.be
    gsm:0484 974 882