I wanted to theme the block using a custom template file like "featured-content-block--1.tpl.php" but it wasn't working.

I have a patch that allows themes to override the template files on a per-block basis, and it also adds an option to include the Node ID #s in the variables provided to the template file. I needed this so that my custom template file could display thumbnail images from the node.

I'll attach the patch to this ticket.

Comments

pcavanaugh’s picture

Here is the patch that fixes the issue and adds an option to send the Node IDs to the template.

pcavanaugh’s picture

Status: Active » Needs review
kristen pol’s picture

Hmmm... not sure why I wasn't notified of this. I normally get all of my issues email to me :/

I'll take a look right now.

kristen pol’s picture

Category: bug » feature
Status: Needs review » Postponed

Not sure what happen to this one. I just looked at the patch and this doesn't appear to be the best way to support this.

kristen pol’s picture

Category: feature » bug

I have used the template suggestion part of the patch to fix the template suggestions (which changed since Drupal 6). I'm unclear as to the purpose for the rest of the patch (node_ids). If you need something else supported, please open a new issue. Thanks!

The code is checked into 7.x-1.x-dev and will be up shortly.

To use the suggestions, you can copy:

featured_content-block.tpl.php (note there is an underscore in the filename)

file to:

featured-content-block--[delta].tpl.php

e.g.

featured-content-block--1.tpl.php

or

featured-content-block--[type].tpl.php

e.g.

featured-content-block--manual.tpl.php

kristen pol’s picture

Status: Postponed » Fixed
kristen pol’s picture

Title: Couldn't theme using template » Template suggestions not working
kristen pol’s picture

Assigned: Unassigned » kristen pol

Status: Fixed » Closed (fixed)

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

kristen pol’s picture

Assigned: kristen pol » Unassigned
Issue summary: View changes

unassigning old issues