samedi 5 novembre 2016

If statement in smarty tpl

I added a button to video watch page of PHP melody CMS by Custom field option

<a href="http://{get_video_meta video_id=$video_data.id key='Buy'}" target:'_blank'> <img style='max-width:100px; max-height:75px' src='http://#'/></a>

this field will be filled from backend and this query

{get_video_meta video_id=$video_data.id key='Buy'}

will be replaced by the url user inserted in backend

I want to make an if statement that if the query has any inserted data, the button appear and if the query is empty, (the user didn't insert url) the button will not be visible.

I saw other questions like this similar question but I didn't get my answer

Aucun commentaire:

Enregistrer un commentaire