Hi everyone :) its my first time in the group although I've been working with Omega for some time now and loving it.
I am now developing a sub-theme of Omega 3.x that requires me to print page title in zone-preface and i thought it should be easy enough but....
So far I created a zone--preface.tpl with following
code inside
<?php
if ($wrapper):
?><?php
print $attributes;
?><?php
endif;
?><div
<?php
print $content_attributes;
?><?php
print $content;
?><?php
print render($title_prefix);
?><?php
if ($title):
?><?php
if ($title_hidden):
?><?php
endif;
?><?php
print $title;
?><?php
if ($title_hidden):
?><?php
endif;
?><?php
endif;
?><?php
print render($title_suffix);
?><?php
if ($wrapper):
?><?php
endif;
?>The idea is for page title to be printed after any blocks that may be inside preface regions and of course for title to print inside the zone and thus zone to render even if there is no blocks in it.
that gave me an error Notice: Undefined variable: title in include() (line 13 of /MYSITE/sites/all/themes/MYTHEME/templates/zone--preface.tpl.php).
so I did some searching hoping to find an answer and this is what I came up with for preprocess_zone.inc
<?php
function MYTHEME_alpha_preprocess_zone(&$vars) {
$theme = alpha_get_theme();
if ($vars['elements']['#zone'] == 'preface') {
$vars['title_prefix'] = $theme->page['title_prefix'];
$vars['title'] = $theme->page['title'];
$vars['title_hidden'] = $theme->page['title_hidden'];
$vars['title_suffix'] = $theme->page['title_suffix'];
}
}
?>But that didn't do the trick either and Notice: Undefined variable: title in include() (line 13 of /MYSITE/sites/all/themes/MYTHEME/templates/zone--preface.tpl.php). is still there...
so now I am at a dead end
Any Omega expert suggestions out there?
Thanks in advance
(And Merry Christmas everyone :) )

Comments
Delta Blocks
If I understand you correctly, you want to display the Page Title field in one of the preface regions rather than the content region?
If so you do not need any php and you do not need to go hacking any template files.
Lastly, you'll need to disable Drupal's default page titles. You'll find this in the Omega theme settings under 'Toggle Advanced Elements.
Tip. You can you the Multiblock module to create multiple instances of any block. As such, you could get more granular control of where the Page Title block is placed throughout your site. For example in Preface First Region for pages, but in the content region for Artilces. This same approach could also for work for a situation where you need the Page Title to appear multiple times in different regions for a given piece of content or content type.
Hope this helps
@MrPaulDriver
Thanks Paul :) Delta did the
Thanks Paul :)
Delta did the trick! I developed about 4 Omega sub-themes so far and for the life of me I couldn't tell you why I never downloaded the Delta module /-:
This definitely works and I will use it but.... I am still curious about the code solution for this. It can't be that hard or...is it?
Drupal web developer and Search Engine Optimisation consultant at Webmar Design & Development Brisbane, Australia
Google+