RE: [SMARTY] Foreach into Section - problem
| From: | Peter Billen | Date: | Mon, 12 Aug 2002 07:36:50 +0000 |
| Subject: | RE: [SMARTY] Foreach into Section - problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5651@lists.php.net to get a copy of this message | ||
Indeed... and I understand now why.
Thanks a lot,
Peter
-----Original Message-----
From: Bob Silva [mailto:bob@bravenet.com]
Sent: zondag 11 augustus 2002 17:43
To: peter@clueless.be; smarty-general@lists.php.net
Subject: Re: [SMARTY] Foreach into Section - problem
Change:
{#clantag_prefix#}{$memberListData.user_nickname[memberList]}{#clantag_p
ostf
ix#}
to:
{#clantag_prefix#}{$memberListData[memberList].user_nickname}{#clantag_p
ostf
ix#}
Bob Silva
----- Original Message -----
From: "Peter Billen" <peter@clueless.be>
To: <smarty-general@lists.php.net>
Sent: Sunday, August 11, 2002 6:46 AM
Subject: [SMARTY] Foreach into Section - problem
> Hello,
>
> I was learning how to handle with foreach's and sections. As a test, I
> was tryin to convert a foreach into a section, but it doesn't work,
and
> I don't see why not.
>
> My foreach: works
> {foreach from=$memberListData item=user_id}
> <tr bgcolor=#2D3741 class=wit><td> .
>
{#clantag_prefix#}{$user_id.user_nickname}{#clantag_postfix#}<br></td></
> tr>
> {/foreach}
>
> My section: it show's the correct number of members (so the loop is
> correct), but it doesn't display the user_nickname
> {section name=memberList loop=$memberListData}
> <tr bgcolor=#2D3741 class=wit><td> .
>
{#clantag_prefix#}{$memberListData.user_nickname[memberList]}{#clantag_p
> ostfix#}<br></td></tr>
> {/section}
>
> What's wrong with this?
>
> Thanks,
>
> Peter
>
--
Smarty General Mailing List (http://smarty.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php