Page 1 of 1
Any change to run smarty tag in Listit's field?
Posted: Thu Feb 14, 2013 12:14 pm
by Recon
Hi,
Trying to show specific gallery module's folder via ListIt. Customer adds new items to ListIt where is text-fields and images. One text-field is for gallery module's tag like {Gallery dir='houses'}. This will not show gallery on the listIt's frontEnd, what I wanted to show.
Any other way to do this? Customer should be able to load specific gallery folder to listit2 "output" ?
br
-R
Re: Any change to run smarty tag in Listit's field?
Posted: Thu Feb 14, 2013 3:51 pm
by Stikki
Install ListItExtended Xdefs (ListIt2XDefs).
Use Gallery dropdown to gain correct gallery dir directly from Gallery module to your item.
Let's say your gallery fields alias is: gallery
Then use gallery tag in ListItExtended templates something like this:
{Gallery dir=$item->gallery}
Should do the trick
-Stikki-
Re: Any change to run smarty tag in Listit's field?
Posted: Tue Apr 16, 2013 8:41 am
by timdebuurman
Hi,
It works.
If none of the galleries is chosen, I don't want to show the gallery at all.
Now if I don't choose one, the gallery dir is showing.
I solved it for now, by removing the content in the gallery template between:
{if $image->isdir}
and
{else}
That shows noting in front, but in the code there is still the rest:
<div class= "gallery"> ... etc.
What I need is a simple {if}-statement to only show the gallery if a item is chosen.
grt Tim
Re: Any change to run smarty tag in Listit's field?
Posted: Thu Apr 25, 2013 9:48 pm
by Dr.CSS
I use this to hide empty content, maybe adapt it to your code...
{content block='newsblock' assign='test'}
{if !empty($test)}
<div class="content">
{$test}
</div>
{/if}
Re: Any change to run smarty tag in Listit's field?
Posted: Fri Apr 26, 2013 9:45 am
by timdebuurman
Problem is that the content is not empty..
There is still the gallery template
Re: Any change to run smarty tag in Listit's field?
Posted: Fri Apr 26, 2013 6:23 pm
by uniqu3
In your ListIt2 template
Code: Select all
{if $item->YOUR_GALLERY_FIELD_ALIAS != ''}
{Gallery dir=$item->YOUR_GALLERY_FIELD_ALIAS}
{/if}