This seems like an obvious omission to me? I mean, the node id is in one of the page template suggestions page-node-[nid].tpl.php) and the block delta in block-[module]-[delta].tpl.php.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

dvessel’s picture

Title: node template suggestions should include node-nid.tpl.php » Add nid to node template suggestion and clean node type suggestion.
Status: Active » Needs review
FileSize
663 bytes

This adds the NID suggestion. It also fixes any strings that may underscores for the node type. The comment was already there but it was overlooked. They are so close together, I rolled it into one.

dvessel’s picture

And this one is for Drupal 6!!

Only cleans the node type.

moshe weitzman’s picture

Status: Needs review » Reviewed & tested by the community

curious that we forgot about this.

Dries’s picture

Status: Reviewed & tested by the community » Fixed

Committed to DRUPAL-6 and CVS HEAD. Thanks dvessel.

alanburke’s picture

Version: 7.x-dev » 6.x-dev
Status: Fixed » Needs review

Sorry to re-open this.

Is there any reason why the nid isn't being made available to Drupal 6 as a template suggestion?

Regards
Alan

moshe weitzman’s picture

Status: Needs review » Fixed

Dries said he committed it to 6.

dvessel’s picture

alanburke, even though the nid is a small change, it is nonetheless a feature so it was only added for 7.

Easy enough to supply through your theme for now.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

bleen’s picture

Just throwin it out there so no one else is confused by this issue: #1 & #2 were never committed to D6... a simple workaround is to put this in your template.php

function mytheme_preprocess_node(&$variables) {
  $node = $variables['node'];

  $variables['template_files'][] = 'node-' . $node->nid;
}
gpk’s picture

Status: Closed (fixed) » Reviewed & tested by the community

Strange, #1 was never intended for 6.x, but #2 was. And despite Dries attempting to commit #2 (http://drupalcode.org/project/drupal.git/commit/e14276f9de429fe776d97a18...) the commitdiff only shows minor whitespace cleanup.

Therefore #2 is RTBC still...!

Status: Reviewed & tested by the community » Needs work

The last submitted patch, clean_node_type_suggestion_string.patch, failed testing.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.