Skip to main content
code formatting
Source Link
niksmac
  • 7.7k
  • 3
  • 31
  • 69

In my page.tpl.phppage.tpl.php I have 2 different sections nl. $page['section_orange']$page['section_orange'] and $page['section_contact']$page['section_contact'].

What I want is for my block.tpl.phpblock.tpl.php to print my heading in < h2 >h2 when a block is listed in the $page['section_orange']$page['section_orange'] section and in < h4 >h4 in the $page['section_contact']$page['section_contact'] section.

How can I achieve this from within my block.tpl.phpblock.tpl.php template. Or do I need to create a hook within my template.phptemplate.php?

In my page.tpl.php I have 2 different sections nl. $page['section_orange'] and $page['section_contact'].

What I want is for my block.tpl.php to print my heading in < h2 > when a block is listed in the $page['section_orange'] section and in < h4 > in the $page['section_contact'] section.

How can I achieve this from within my block.tpl.php template. Or do I need to create a hook within my template.php?

In my page.tpl.php I have 2 different sections nl. $page['section_orange'] and $page['section_contact'].

What I want is for my block.tpl.php to print my heading in h2 when a block is listed in the $page['section_orange'] section and in h4 in the $page['section_contact'] section.

How can I achieve this from within my block.tpl.php template. Or do I need to create a hook within my template.php?

Source Link
jae.phoenix
  • 233
  • 2
  • 11

Print Block heading for $page - section

In my page.tpl.php I have 2 different sections nl. $page['section_orange'] and $page['section_contact'].

What I want is for my block.tpl.php to print my heading in < h2 > when a block is listed in the $page['section_orange'] section and in < h4 > in the $page['section_contact'] section.

How can I achieve this from within my block.tpl.php template. Or do I need to create a hook within my template.php?