Hi All, I need to add {Gallery dir='comfort'} smarty tag to a product in CG products module. But its does not work. I have run a {debug} tag from the template but the Gallery tag does not show up. I have increase the PHP memory to 128MB and get no change.
Please goto http://baby.motivatedtraining.co.uk/Pro ... %20blanket to see an example.
Any ideas?
Thanks for your help
Cheers, Barry
Smarty tag not working with Products Module
-
- Forum Members
- Posts: 63
- Joined: Fri Jul 13, 2007 6:49 am
Re: Smarty tag not working with Products Module
In the product description, try replacing
{Gallery dir='comfort'}
with
{capture name='gallery'}{Gallery dir='comfort'}{/capture}{eval var=$gallery}
{Gallery dir='comfort'}
with
{capture name='gallery'}{Gallery dir='comfort'}{/capture}{eval var=$gallery}
-
- Forum Members
- Posts: 63
- Joined: Fri Jul 13, 2007 6:49 am
Re: Smarty tag not working with Products Module
Hi,
Thanks for that, but no joy.
The gallery tag works if its placed in the template. Which is fine but I need to add different gallery dir to products. It look as if the smarty tag is not being read by the product page - is there some thing I can do to the template to correct this?
I have looked at http://forum.cmsmadesimple.org/viewtopic.php?t=18011 but I have little working knowledge of smarty and don't understand.
Thank for your help
Thanks for that, but no joy.
The gallery tag works if its placed in the template. Which is fine but I need to add different gallery dir to products. It look as if the smarty tag is not being read by the product page - is there some thing I can do to the template to correct this?
I have looked at http://forum.cmsmadesimple.org/viewtopic.php?t=18011 but I have little working knowledge of smarty and don't understand.
Thank for your help
Re: Smarty tag not working with Products Module
When you say that the Gallery tag works if placed in the template, are you talking about the page template or the Products summary/detail template?
-
- Forum Members
- Posts: 63
- Joined: Fri Jul 13, 2007 6:49 am
Re: Smarty tag not working with Products Module
The tag works when placed onto the product details template.
Thanks for your help, Barry
Thanks for your help, Barry
Re: Smarty tag not working with Products Module
Create extra field in Products like "my_dir"
Then in Products template:
Then in Products template:
Code: Select all
{if !empty($entry->fields.my_dir->value)}
{Gallery dir=$entry->fields.my_dir->value}
{/if}
-
- Forum Members
- Posts: 63
- Joined: Fri Jul 13, 2007 6:49 am
Re: Smarty tag not working with Products Module
Thanks for that - I have had a look and am not sure what is supposed to happen.
Any other ideas - cheers
Barry
Any other ideas - cheers
Barry
Re: Smarty tag not working with Products Module
In created extra field you enter "comfort" and Gallery should show up if you have the line i posted above in you "Products Template".
Otherwise edit your Products template where it says:
{$entry->details} to {eval var=$entry->details}
Then you are able to add {Gallery} in your WYSIWYG Products area and it will return Module instead of plain text.
Otherwise edit your Products template where it says:
{$entry->details} to {eval var=$entry->details}
Then you are able to add {Gallery} in your WYSIWYG Products area and it will return Module instead of plain text.
Re: Smarty tag not working with Products Module
Thank you, uniqu3! That's what I was trying to say in my post above, but I'd forgotten the correct syntax...uniqu3 wrote: Otherwise edit your Products template where it says:
{$entry->details} to {eval var=$entry->details}
Then you are able to add {Gallery} in your WYSIWYG Products area and it will return Module instead of plain text.