Hi,

I can add a new region to my page.tpl.php templates but can't seem to get a new region to show up when adding to user-profile.tpl.php. Can anyone tell me how to correctly add a new region to my user-profile.tpl.php?

Thanks for any help.

Comments

VM’s picture

add the region to page.tpl.php and any blocks set to that region can be set to only display on the user profile.

VM’s picture

regions are defined in the theme .info file
the HTML and variable are printed in the tpl.php file
style with CSS as needed.
ensure to clear the drupal database cache to have the .info file and tpl.php file changes added to the theme registry.

No idea whether a region can be added to the user tpl.php file. Usually they are added to page.tpl.php and block visibility is used to display a block or some conditional PHP is used to display the region

one can also investigate the context.module and enable specific regions in specific areas.

ajay547’s picture

You can create region in thems's info file and print the region in page.tpl
and through URL you can distinguish the block that will be printed on your user profile only.
Hope this will work for you..

Thanks & Regards,

Ajay Singh

Jboo’s picture

Ah I see. I didn't realize I could create a page--user template file. My profiles are quite complicated but I'll work it out by customizing this template.

Thanks for your help.

My new EasySnoozing, Nursing and BusinessEgghead websites on D7!

webmestre’s picture

How to declare theme_hook_suggestions for page--user.tpl.php ?