using {$entry->Picfolder} in an {assign} not working?
Posted: Wed Oct 09, 2019 11:51 am
I'm trying to access a folder which contains images.
The user inserts the name of the folder to a custom field in the News module.
In the news detail template I have this to loop through the images in the folder.
But for some reason that I haven't figured out it is like the path doesn't get assigned to the pics variable.
can someone please advise me on this?
The user inserts the name of the folder to a custom field in the News module.
In the news detail template I have this to loop through the images in the folder.
But for some reason that I haven't figured out it is like the path doesn't get assigned to the pics variable.
Code: Select all
{assign var='pics' value='uploads/images/{$entry->Picfolder}/*.jpg'}
{foreach from=$pics item='pic'}
<div><img src='{root_url}/{$pic}' width='600' height='600' alt='' /></div>
{/foreach}