Smarty Forum Index Smarty
WARNING: All discussion is moving to https://reddit.com/r/smarty, please go there! This forum will be closing soon.

[Solved] Failed using thumb_imp plug-in inside a {section}

 
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    Smarty Forum Index -> Plugins
View previous topic :: View next topic  
Author Message
waro
Smarty Regular


Joined: 12 Jun 2008
Posts: 38

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: 5068
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: 38

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:   
This forum is locked: you cannot post, reply to, or edit topics.   This topic is locked: you cannot edit posts or make replies.    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