Hello

After hour of painfull debugging I got that documentation of theme.inc is lying about template suggestions. For example:

 * - views-view--page--foobar.tpl.php
 * - views-view--page.tpl.php
 * - views-view--foobar.tpl.php
 * - views-view.tpl.php
 *
 * - views-view-unformatted--page--foobar.tpl.php
 * - views-view-unformatted--page.tpl.php
 * - views-view-unformatted--foobar.tpl.php
 * - views-view-unformatted.tpl.php

But in real world, templates looks like:

views-view-unformatted--foobar--page.tpl.php

("page" is in the end)

I prepared patch to fix this. Hope it saves hours of debugging their themes for other folks.

CommentFileSizeAuthor
views_theme_inc.patch853 bytesneochief

Comments

neochief’s picture

Status: Active » Needs review
merlinofchaos’s picture

While I agree that this documentation is wrong, I'm surprised it even affected you. The 'theme: information' on every view gives precise template naming suggestions and is referenced in almost all of the theming documentation.

neochief’s picture

Gee, thanks! I didn't noticed that link before. Just migrated from D5 and still doing things as usual — scanning the source code :)

merlinofchaos’s picture

Status: Needs review » Fixed

Committed to HEAD. Thanks for the patch!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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