Jump to content

Remove hook if no graft module


Testun

Recommended Posts

Hi,

I wish some blocks disappear if no module is grafted.

For example, no module is grafted to the position "header top" = this region does not appear.

I would need a condition to put in the template, but I do not find which. For example: "if a module is grafted" mon code "else" code "endif).

Do you know an identical condition?

Tahnks in advance

Link to comment
Share on other sites

3 minutes ago, Testun said:

Hi,

I wish some blocks disappear if no module is grafted.

For example, no module is grafted to the position "header top" = this region does not appear.

I would need a condition to put in the template, but I do not find which. For example: "if a module is grafted" mon code "else" code "endif).

Do you know an identical condition?

Tahnks in advance

Try this:

 

{if isset($HOOK_TOP)}{$HOOK_TOP}{else}whatever{/if}

 

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...