Page 1 of 1

CGSmartimage - help sample...

Posted: Fri Jun 21, 2013 3:42 pm
by soportepro
With CMSMS release 1.11.6 this sample do not work, any suggestion to change?

<__script__ type="text/javascript">{literal}
jQuery(document).ready(function(){
jQuery('a.fancybox').fancybox();
});
{/literal}</__script>
{assign var='files' value='uploads/album/*.jpg'|glob}
{if count(\$files)}
<div style="width: 100%; height: 150px; overflow: auto;">
{foreach from=\$files item='file'}
<a rel='simple_album' class="fancybox" href="{CGSmartImage src=\$file filter_rotate=90 filter_watermark=1 filter_resize='h,500' notag=1 noembed=1}">
{CGSmartImage src=\$file filter_rotate=90 filter_grayscale=1 filter_watermark=1 filter_resize='h,150'}
</a>
{/foreach}
</div>
{/if}

By example: \$files send me an error when try to save. Remove it and do not work.

Sorry but I m from 1.10.x and never see this...

Re: CGSmartimage - help sample...

Posted: Fri Jun 21, 2013 4:25 pm
by Rolf
Try:

Code: Select all

<__script__ type="text/javascript">
jQuery(document).ready(function() {
  jQuery('a.fancybox').fancybox();
} );
</__script>

{assign var='files' value='uploads/album/*.jpg'|glob}

{if count($files)}
<div style="width: 100%; height: 150px; overflow: auto;">
  {foreach from=$files item='file'}
    <a rel='simple_album' class="fancybox" href="{CGSmartImage src=$file filter_rotate=90 filter_watermark=1 filter_resize='h,500' notag=1 noembed=1}">
      {CGSmartImage src=$file filter_rotate=90 filter_grayscale=1 filter_watermark=1 filter_resize='h,150'}
    </a>
  {/foreach}
</div>
{/if}