cedib Posted October 23, 2019 Share Posted October 23, 2019 Hi, From a module I have extra fields in categories in 1.7.6.1, such as a custom title. The module gives me then the widget code to add in the tpl: {widget name='customfieldsmodule' hook='cat_custom_h1'} What conditional statement can I put to check if the field is empty or not? I've tried this but it doesn't work: {assign var='displayCatCustomH1' value={widget name='customfieldsmodule' hook='cat_custom_h1'} } {if $displayCatCustomH1}{if $displayCatCustomH1}{/if} Has anyone any idea? Thanks Link to comment Share on other sites More sharing options...
cedib Posted October 23, 2019 Author Share Posted October 23, 2019 Does it happen to others that Prestashop seem to add some comments in the front-end rendering code of the widget? <!-- begin module:mymodule/views/templates/hook/customHook.tpl —> <!-- begin /home/vdfvfhdr/public_html/mysite/modules/mymodule/views/templates/hook/customHook.tpl —> <div>Content of my custom field</div> <!-- end /home/vdfvfhdr/public_html/mysite/modules/mymodule/views/templates/hook/customHook.tpl —> <!-- end module:mymodule/views/templates/hook/customHook.tpl —> Is there a way to get rid of this? I think that's why my condition is not working. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now