SMARTY: cycle arguments loaded from config file?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • mike@east32ndst.com

    SMARTY: cycle arguments loaded from config file?

    I'd like to have the options for my cycle loaded from the config file
    if possible. So far I haven't been able to find the right syntax or an
    example, any ideas?

    ie
    <code>
    *** config file ***
    [index]
    color1="#eeeeee "
    Color2="#dddddd "

    *** tpl ***
    {config_load file="test.conf " section="index" }

    {section name=members loop=$users}
    <tr bgcolor="{cycle values="{#color 1#},{#color2#}" } >
    <td>{$users[members].id}</td><td>{$users[members].email}</td>
    </tr>
    {/section}
    </code>

  • Andy Hassall

    #2
    Re: SMARTY: cycle arguments loaded from config file?

    On 6 Apr 2005 14:12:00 -0700, mike@east32ndst .com wrote:
    [color=blue]
    >I'd like to have the options for my cycle loaded from the config file
    >if possible. So far I haven't been able to find the right syntax or an
    >example, any ideas?
    >
    >[index]
    >color1="#eeeee e"
    >Color2="#ddddd d"
    >
    > <tr bgcolor="{cycle values="{#color 1#},{#color2#}" } >[/color]

    {cycle values="`$smart y.config.color1 `,`$smarty.conf ig.color2`"}

    --
    Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
    <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis tool

    Comment

    • R. Rajesh Jeba Anbiah

      #3
      Re: SMARTY: cycle arguments loaded from config file?

      mike@east32ndst .com wrote:[color=blue]
      > I'd like to have the options for my cycle loaded from the config file
      > if possible. So far I haven't been able to find the right syntax or[/color]
      an[color=blue]
      > example, any ideas?[/color]
      <snip>




      --
      <?php echo 'Just another PHP saint'; ?>
      Email: rrjanbiah-at-Y!com Blog: http://rajeshanbiah.blogspot.com/

      Comment

      • mike@east32ndst.com

        #4
        Re: SMARTY: cycle arguments loaded from config file?

        thanks, worked perfectly...

        Andy Hassall wrote:[color=blue]
        > On 6 Apr 2005 14:12:00 -0700, mike@east32ndst .com wrote:
        >[color=green]
        > >I'd like to have the options for my cycle loaded from the config[/color][/color]
        file[color=blue][color=green]
        > >if possible. So far I haven't been able to find the right syntax or[/color][/color]
        an[color=blue][color=green]
        > >example, any ideas?
        > >
        > >[index]
        > >color1="#eeeee e"
        > >Color2="#ddddd d"
        > >
        > > <tr bgcolor="{cycle values="{#color 1#},{#color2#}" } >[/color]
        >
        > {cycle values="`$smart y.config.color1 `,`$smarty.conf ig.color2`"}
        >
        > --
        > Andy Hassall / <andy@andyh.co. uk> / <http://www.andyh.co.uk >
        > <http://www.andyhsoftwa re.co.uk/space> Space: disk usage analysis[/color]
        tool

        Comment

        Working...