Hi Folks,

I'm starting with Zen. How is the logo and title line properly replaced with alternate content?

As a php coder, my first inclination is to just hard-code my header content into page.tpl.php or some other file, but I have a feeling that this is not the Drupal way.

Should I create a new block? A new module? Something that can be adjusted within the administrative back end? Edit the page.tpl.php? Edit index.php directly?

Thanks for your help.

Sincerely,
Keith

Comments

kmiklas’s picture

Bump

kmiklas’s picture

I copied the page.tpl.php file to my Zen sub-template folder, edited this new file, commented out the logic for the name and slogan, and set up my own header with a couple of snazzy div's and graphics.

Maybe down the road I will actually create a separate region and block to contain the header info that I want, but after some thought, I concluded that the above solution is better aligned with the Zen methodology. There's probably a reason that they didn't set up the logo this way, and until I get more experience, I'm going to follow suit.

Jeff Burnz’s picture

There's no real issue with what you have done, none, but in your OP you didn't specify what the alternate content is?

For example to replace the logo just replace the logo.png in your subtheme, its automagically pulled as the logo. Site name is a configuration option in settings.

kmiklas’s picture

Normally that's exactly what I would do, but on this project, the requirements for the logo and top-line structure are fundamentally different.

For example, the logo is not an image--it's text dynamically styled with CSS and jQuery. It would be insipid to take a screen shot and make a "logo.png" image of this text--even if animated. So, in this case some structural changes to the Zen template were required to accommodate this design.

Jeff Burnz’s picture

Yeah, I thought as much, I hope you weren't insulted by my post (pointing out the most basic things), I would hard code that as well, being the kind of thing that will hardly ever/never change etc.

kmiklas’s picture

Not insulted at all thanks for responding.