developer.jelix.org is not used any more and exists only for history. Post new tickets on the Github account.
developer.jelix.org n'est plus utilisée, et existe uniquement pour son historique. Postez les nouveaux tickets sur le compte github.

Opened 12 years ago

Closed 11 years ago

Last modified 10 years ago

#808 closed enhancement (fixed)

Plugin de template pour sortir d'une boucle avec break

Reported by: dlalleme Owned by: bballizlife
Priority: low Milestone: Jelix 1.2 beta
Component: jelix:plugins:tpl Version: 1.1RC2
Severity: minor Keywords:
Cc: Blocked By:
Blocking: Documentation needed: no
Hosting Provider: Php version:

Description

Le code se situe dans le répertoire plugins/tpl/common

  <?php
  function jtpl_cfunction_common_break($compiler, $params=array()) 
  {
    $php = ' break;';
    return $php;
  }
  ?>

Change History (11)

comment:1 Changed 12 years ago by dlalleme

  • Type changed from bug to enhancement

comment:2 Changed 12 years ago by laurentj

  • Milestone set to Jelix 1.2
  • Priority changed from normal to low
  • Severity changed from normal to minor

comment:3 Changed 11 years ago by bballizlife

Could you please provide a complete file with comments headers, containing your name. Then set review?

Thanks

comment:4 Changed 11 years ago by dlalleme

  • review set to review+

Bonjour,

Vous trouverez ci-joint les informations demandées. J'espère que cela sera suffisant

Cordialement

/**
* @package     Jelix
* @subpackage  sous-package
* @author      dlalleme
* @contributor plugins/tpl/common
* @copyright   2009 dlalleme
* @link        http://www.jelix.org
* @licence     GNU Lesser General Public Licence see LICENCE file or http://www.gnu.org/licenses/lgpl.html
*/

<?php
  function jtpl_cfunction_common_break($compiler, $params=array()) 
  {
    $php = ' break;';
    return $php;
  }
  ?>

comment:5 Changed 11 years ago by bballizlife

  • review changed from review+ to review?

Si tu peux simplement donner un exemple rapide d'utilisation dans un template et ça sera bon. Merci

comment:6 Changed 11 years ago by bballizlife

Ok c'est bon pour moi, j'aurais juste besoin de ton nom complet si possible pour que je t'ajoute dans le fichier CREDITS et je commit ça.

comment:7 Changed 11 years ago by dlalleme

Voici un exemple :

  {assign $i = 0}
  {foreach $tablemar as $tabmar}
  <li class="sousmenu-selection-visible">
        <a href="{$tabmar['lienmar']}">{$tabmar['libmar']|eschtml} <span class="nb" >{$tabmar['nbpro']}</span></a>
  </li>
  {if $i == 4}
  {break}
  {/if}
  {assign $i++}
  {/foreach} 

Mon nom réel est Denis LALLEMENT

comment:8 Changed 11 years ago by bballizlife

  • Owner set to bballizlife
  • review changed from review? to review+
  • Status changed from new to assigned

commited in trunk r1415. Thanks !

comment:9 Changed 11 years ago by bballizlife

  • Resolution set to fixed
  • Status changed from assigned to closed

comment:10 Changed 10 years ago by laurentj

  • Documentation needed set

comment:11 Changed 10 years ago by laurentj

  • Component changed from jelix:plugins to jelix:plugins:tpl
  • Documentation needed unset
Note: See TracTickets for help on using tickets.