Jump to content

[SOLVED] How to find hook position in .tpl


Recommended Posts

In module.tpl I'd like to be able to change the css for a div, based on the its hook position. e.g. if the module is hooked at the top then a list is to be displayed horizontally, if it's hooked to the left column then it is displayed vertically.

 

Please can anyone tell me how to find the calling hook's name or id so that I can replace HOOK in the module.tpl code below

<div {if HOOK=="Top"} class="moduletop" {else} class="moduleleft" {/if}>

Thanks

Link to comment
Share on other sites

you can achieve this with css styles only, without modification of the .tpl files.

 

if your module is attached to left column you can use

 

#left_column .module {background:red;}

#right_column .module {background:red;}

etc.

 

just use one class ="module" or any other name you want. then you will be able to stylize it depending on parent id.

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