The attached patch implements Zen's hook_preprocess_page() making Zen based subthemes automatically benefit from this module.

CommentFileSizeAuthor
page_title_for_zen.patch465 bytesTBarregren

Comments

nicholasthompson’s picture

Status: Reviewed & tested by the community » Needs work

Technically its good practice to wrap the function in an "if (module_exists('page_title))" check first. If you dont then if you admin decides to disable the module then the entire site goes down with a "function not found" type error.

Thanks for the patch though! I'll commit this to the documentation once done.

johnalbin’s picture

Actually, a module_exists() check is unnecessary in this case. Zen-based themes will call any HOOK_preprocess_page functions that are implemented by modules. So, if page_title is disabled (or not installed), it won't call page_title_preprocess_page(); and if page_title is enabled, page_title_page_get_title() is available. :-)

(Btw, Zen's usage of HOOK_preprocess_page is a back-port of a D6 theme system feature.)

Thomas, I apologize for not having time to do a review right now. But the patch looks good.

nicholasthompson’s picture

Status: Needs review » Reviewed & tested by the community

Ohhh I see - sorry, I thought that was a template hook and not a module hook.

I'll commit this into the latest Page Title 2.0...

nicholasthompson’s picture

Version: 5.x-1.1 » 5.x-2.x-dev
Status: Needs work » Fixed

Fixed in Page Title 2.0 Dev as of now - will be in ALPHA7 soon.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.

venkat-rk’s picture

Did this make it into the tarball for 5.x-2.0?

I am using it with drupal 5.16 and the Zen Classic sub-theme, but I don't see the field for controlling the page title anywhere on the node.