User login

Zen

Remove the main content title from the front page of the site

Sometimes we have a lot of blocks from views and such on our front page, going where the content usually goes, so we don't want our front page to be the /node stream. We could make it a View page but if all the other Views are blocks, it seems wrong to play favorites (and may be annoying for theming or changing things later). Plus, it's nice to have that one node for the little bit of (easily editable) static content.

Here's the function for "example" theme's template.php to remove the page title:

CSS aggregation with Zen-based theme caused one particular server to stop serving Drupal pages

Weirdest. Server. Drupal. Zen. Bug. Ever. Our client's site suddenly stopped working. With a server error.
Safari can’t open the page. Safari can’t open the page “http://www.example.com/landing” because the server unexpectedly dropped the connection. This sometimes occurs when the server is busy. Wait for a few minutes, and then try again.
Opera was just a blank white screen. But other sites on the server were still working.

Add a subsection class to Drupal page body for theming Views and other parts of a site that can be defined by parts of the path

I had wanted to add the name of the view with its display to the body classes (Views apparently provides everything but that combination, and not all browsers we need to support deal with matching on two sibling classes). Looked in Zen for how to do it first though and as a consequence saw a way to add new sub-section body class with the first two parts of each URL.

This goes in your zen subtheme's implementation of preprocess page:

Zen theme in wrong location on live server breaks sites using zen subthemes when database restored on test and dev

Production working fine, copy database back for test and dev, and the environment breaks, fatally:

Fatal error: Call to undefined function zen_theme() in
/var/www/example/drupal/sites/default/themes/example/template.php on line 85

And there is something different about the Zen being seen by the two sites, but the code seems identical, and agariclabs is a restore of the stage database.

Clean string for use as HTML classes and IDs

Zen theme has a handy function to take any string and make it safe for an HTML/CSS id:

zen_id_safe($string)

drupal remove quotation marks

Fixing Zen's false out-of-date update status warning

zen theme claims out of date
zen theme update status out of date

See issue:
Sub-theme's .info file triggers incorrect "out of date" flag in update module
http://drupal.org/node/254821

Resolved:
git commit -m "Remove date from zen subtheme .info to remove bogus Zen theme needs updating message."

git get the diff of a file revision ago

Syndicate content