Jump to content

Check if custom hook is set?


yaniv14

Recommended Posts

  • 1 year later...

It is weird how this question was not solved yet, all forum is about how to make new custom hooks, but nothing about how to output in a better way.
I've searched a lot, and here it is some informations.

The simple way, as it is in the documentation:

{hook h='myCustomHook'}

Alterantive way:

{hook::exec('myCustomHook')}

And finally, a version to check if the hook displayFooterTop is set (i wanted to add some extra tags in a template):

{assign var='displayFooterTop' value={hook h='displayFooterTop'} }
{if $displayFooterTop}
<div class="footer-top">
	{$displayFooterTop}
</div>	
{/if}
Edited by zod (see edit history)
  • Like 2
  • Thanks 2
Link to comment
Share on other sites

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...