Using Smart Image within News template - not working

Have a question or a suggestion about a 3rd party addon module or plugin?
Let us know here.
Post Reply
johnboyuk1
Forum Members
Forum Members
Posts: 235
Joined: Mon Nov 26, 2018 3:09 pm

Using Smart Image within News template - not working

Post by johnboyuk1 »

Hi all

I'm trying to use Smart Image to resize images that are in the News module articles ... so in my News Detail template ive got this:

Code: Select all

{si_convert filter_resize='w,50'}
	{$entry->content}
{/si_convert}
It doesnt work though. I note that in the template it says this:
note, for security purposes we do not pass the content through smarty before displaying it. This is incase your articles can come from untrusted sources.
Is that why this wont work ... and whats the workaround to make it work?!

Thanks
johnboyuk1
Forum Members
Forum Members
Posts: 235
Joined: Mon Nov 26, 2018 3:09 pm

Re: Using Smart Image within News template - not working

Post by johnboyuk1 »

just to say Ive also tried it in the main page template wrapping the {News} tag and that didnt work either

Code: Select all

{si_convert filter_resize='w,50'}
{News}
{/si_convert}
The normal SmartImage tag works fine so the module is working

{SmartImage src='/images/test.jpg' filter_resize='w,50'}

Just cant seem to get the {si_convert} tag to work
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1825
Joined: Wed Feb 25, 2009 4:25 am

Re: Using Smart Image within News template - not working

Post by DIGI3 »

In your first example, try using {eval var=$entry->content}. I'm not sure if that's why it's not working, as I don't see why it would have to be parsed through Smarty for the wrapper tags to work, but that's all I can think of. Check your error logs for more clues.
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 235
Joined: Mon Nov 26, 2018 3:09 pm

Re: Using Smart Image within News template - not working

Post by johnboyuk1 »

I've tried just wrapping a {content} tag as per module help and that doesnt work either ... nothing in error logs

suggests tag doesn't work ... can anyone else replicate?
User avatar
DIGI3
Dev Team Member
Dev Team Member
Posts: 1825
Joined: Wed Feb 25, 2009 4:25 am

Re: Using Smart Image within News template - not working

Post by DIGI3 »

It looks like filters don't work, but they do in cgsi so probably just a forking bug. The max_width and max_height parameters do work, so you might be able to use those for now until a patch is released. I have filed a BR: http://dev.cmsmadesimple.org/bug/view/12491
Not getting the answer you need? CMSMS support options
johnboyuk1
Forum Members
Forum Members
Posts: 235
Joined: Mon Nov 26, 2018 3:09 pm

Re: Using Smart Image within News template - not working

Post by johnboyuk1 »

Thanks for confirming the bug!

Any idea how quickly the team on this will get to a fix?
Post Reply

Return to “Modules/Add-Ons”