New Podcast

Posted Tuesday, July 27 at 2:29 pm

Ryan Price and Mike Anello recently talked with Jacob Redding (jredding), author of Beginning Drupal as well Treasurer and Interim General Manager of the Drupal Association.

Download Podcast 41
DrupalEasy_ep41_20100727.mp3
Syndicate content

NEWSLETTER

Stay informed on our latest news!

Syndicate content

Testimonial

Spending the day with you guys really helped me realize that Drupal allows me to do many of the same things I manually did, but in a nice little package already to go. I look forward to attending the next class you have.

Who are we?

DrupalEasy is the collective expertise of Ryan Price and Michael Anello, who joined forces to provide training and consulting services worldwide. Read all about them and what they can do.

What is Drupal?

Drupal is a free, super-powerful content management system for sites that require information posting and collection, including blogs, forums, videos, photos, and databases of information. We think it is the best platform available. Here's why...

Why Drupal?

More and more savvy organizations are going with Drupal for content management, and its no mystery why. It’s free, flexible, and easy to maintain for small or large volume sites. Learn more...

Can't set Page Title inside hook_preprocess_page? Hack it!

If your client is being very picky about the titles of certain pages, especially views, you may find yourself needing to write some code to set the title at the theme level. This is normally fine, since Drupal 6 has some great hooks, like hook_preprocess_page() and its cousins for blocks, nodes, and user profiles.

This should be the right place to call drupal_set_title() and be on your way, but you may not get the expected results. This may also apply to any functions that place output in the header of the HTML, like CSS, Javascript, Feeds, and Meta tags.

A workaround is documented on the CivicActions blog involving hooking into the theme registry and adding a function very very early in the process to help you set the page title appropriately.

Link: Can't Add CSS, JS, RSS Icon Or Set Title Or Messages In Preprocess Page?

Trackback URL for this post:

http://www.drupaleasy.com/trackback/181
No votes yet
Syndicate content