Add nid to node template suggestion and clean node type suggestion.

gpk - June 11, 2008 - 18:28
Project:Drupal
Version:6.x-dev
Component:theme system
Category:feature request
Priority:normal
Assigned:Unassigned
Status:closed
Description

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.

#1

dvessel - June 14, 2008 - 17:37
Title:node template suggestions should include node-nid.tpl.php» Add nid to node template suggestion and clean node type suggestion.
Status:active» patch (code needs review)

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.

AttachmentSize
template_suggest_node_id.patch663 bytes

#2

dvessel - June 14, 2008 - 17:43

And this one is for Drupal 6!!

Only cleans the node type.

AttachmentSize
clean_node_type_suggestion_string.patch616 bytes

#3

moshe weitzman - June 17, 2008 - 04:08
Status:patch (code needs review)» patch (reviewed & tested by the community)

curious that we forgot about this.

#4

Dries - June 18, 2008 - 16:23
Status:patch (reviewed & tested by the community)» fixed

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

#5

alanburke - June 18, 2008 - 16:58
Version:7.x-dev» 6.x-dev
Status:fixed» patch (code 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

#6

moshe weitzman - June 18, 2008 - 18:11
Status:patch (code needs review)» fixed

Dries said he committed it to 6.

#7

dvessel - June 18, 2008 - 18:40

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.

#8

Anonymous (not verified) - July 2, 2008 - 18:44
Status:fixed» closed

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

 
 

Drupal is a registered trademark of Dries Buytaert.