Re: [SMARTY] Foreach into Section - problem
| From: | Bob Silva | Date: | Sun, 11 Aug 2002 15:42:38 +0000 |
| Subject: | Re: [SMARTY] Foreach into Section - problem | ||
| References: | 1 | Groups: | php.smarty.general |
| Request: | Send a blank email to php-smarty-general+get-5650@lists.php.net to get a copy of this message | ||
Change:
{#clantag_prefix#}{$memberListData.user_nickname[memberList]}{#clantag_postf
ix#}
to:
{#clantag_prefix#}{$memberListData[memberList].user_nickname}{#clantag_postf
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
>