Smarty Forum Index Smarty
The discussions here are for Smarty, a template engine for the PHP programming language.
[Solved] Failed using thumb_imp plug-in inside a {section}

 
Post new topic   Reply to topic    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
waro
Smarty Regular


Joined: 12 Jun 2008
Posts: 35

PostPosted: Tue Oct 29, 2013 3:15 am    Post subject: [Solved] Failed using thumb_imp plug-in inside a {section} Reply with quote

Using thumb_imp plugin, I can't seem to make it work inside a {section}.

Here's my code:
Code:
<ul>
{section name=seq loop=$img}
    <li>
    {if $img[seq].picture}
    {thumb file="/uploads/pages/$img[seq].picture" width="82" height="78" link="false" html='class="left thumb"'}
    {/if}
    </li>
{/section}
</ul>


Last edited by waro on Sun Nov 03, 2013 2:52 am; edited 1 time in total
Back to top
View user's profile Send private message
U.Tews
Administrator


Joined: 22 Nov 2006
Posts: 4703
Location: Hamburg / Germany

PostPosted: Tue Oct 29, 2013 7:47 pm    Post subject: Reply with quote

Use backticks to mark complex variables in double quoted strings

Code:
<ul>
{section name=seq loop=$img}
    <li>
    {if $img[seq].picture}
    {thumb file="/uploads/pages/`$img[seq]`.picture" width="82" height="78" link="false" html='class="left thumb"'}
    {/if}
    </li>
{/section}
</ul>
Back to top
View user's profile Send private message
waro
Smarty Regular


Joined: 12 Jun 2008
Posts: 35

PostPosted: Wed Oct 30, 2013 12:49 pm    Post subject: Reply with quote

It works!

Thank you...
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Smarty Forum Index -> Plugins All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP