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
Any change to run smarty tag in Listit's field?
-
Stikki
Re: Any change to run smarty tag in Listit's field?
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-
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-
- timdebuurman
- Power Poster

- Posts: 891
- Joined: Sun Nov 06, 2011 8:15 pm
Re: Any change to run smarty tag in Listit's field?
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
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
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
https://www.nextdoormedia.nl
Re: Any change to run smarty tag in Listit's field?
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}
{content block='newsblock' assign='test'}
{if !empty($test)}
<div class="content">
{$test}
</div>
{/if}
- timdebuurman
- Power Poster

- Posts: 891
- Joined: Sun Nov 06, 2011 8:15 pm
Re: Any change to run smarty tag in Listit's field?
Problem is that the content is not empty..
There is still the gallery template
There is still the gallery template
NextDoorMedia - Online Marketing Partner
https://www.nextdoormedia.nl
https://www.nextdoormedia.nl
-
uniqu3
Re: Any change to run smarty tag in Listit's field?
In your ListIt2 template
Code: Select all
{if $item->YOUR_GALLERY_FIELD_ALIAS != ''}
{Gallery dir=$item->YOUR_GALLERY_FIELD_ALIAS}
{/if}

