Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jhodgdon’s picture

Title: Documentation problem with page.tpl.php » page.tpl.php doc is missing $node
Version: 6.x-dev » 7.x-dev

Good point.

Needs fix in Drupal 7, then backport to Drupal 6.

jhodgdon’s picture

Status: Active » Needs review
FileSize
2.06 KB

Here's a patch for Drupal 7: adds $node, and fixes a couple of minor formatting issues (lines longer than 80 characters).

If accepted, the new $node line should be added to the D6 version too, and there are a couple of formatting issues there too.

NaheemSays’s picture

+ * - $is_front: TRUE if the current page is the front page. Used to toggle the
+ *   mission statement.

Is the second sentence still true in Drupal 7? Either way, it is unneeded as that is an implementation detal. $is_front can be used by other things too.

jhodgdon’s picture

Good point, I'll take that out. It's not being used in the module/system/page.tpl.php at a minimum.

jhodgdon’s picture

Status: Needs review » Needs work
jhodgdon’s picture

Status: Needs work » Needs review
FileSize
2.02 KB

Here's a new patch, with the thing about the mission statement removed, since it certainly is not reflected in this page.tpl.php file.

moshe weitzman’s picture

Status: Needs review » Needs work

I would prefer "If the page is a node detail page,". I added the word detail

joachim’s picture

Is 'node detail page' the term we're using for what is at node/xx?
It would be handy if we had such a term, and that might be clearer than things like 'node page' (urgh!) and 'node view' (matches the UI, but confusable with Views module!). Would need to be listed as the standard terminology and docs updating to use it.

jhodgdon’s picture

Status: Needs work » Needs review
FileSize
2.2 KB

Well, it's actually not just node detail display pages. It's any page that has a menu router item using node_load() to auto-load a node, if the node ID is in the second position of the path. Because $node is included if it is returned from http://api.drupal.org/api/function/menu_get_object/7

So here's a patch which documents this. Hope it's not too confusing.

grendzy’s picture

Status: Needs review » Reviewed & tested by the community

Looks good to me.

webchick’s picture

Version: 7.x-dev » 6.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Looks like a good clean-up. Committed to HEAD.

Moving down to 6.x-dev for porting.

rdrh555’s picture

Assigned: Unassigned » rdrh555
Status: Patch (to be ported) » Needs review
FileSize
2.67 KB

Patch for D6

jhodgdon’s picture

Status: Needs review » Needs work

Hmmm.

If you are going to fix up this doc header, it would be good to end up with it completely fixed. For instance, it should end up with all lines wrapping at 80 characters or less in the doc header (as close to 80 characters as possible), and no whitespace at the ends of lines.

Other than that, it looks good. Thanks!

rdrh555’s picture

Status: Needs work » Needs review

Hmmm, while reviewing this, patch looks as though it deletes the $tabs and $messages (total 3) lines. I did not do that. I moved "prominently" to the next line, but that's it. Don't understand.....the lines still exist in my local copy.

jhodgdon’s picture

Status: Needs review » Needs work

cross post...

Not sure what's happening in your patch. Maybe try creating it again?

jhodgdon’s picture

Oh. Your patch is fine in that regard. It removes the lines and replaces them with different lines. $tabs is still there.

rdrh555’s picture

Status: Needs work » Needs review

Was writing #14 as you posted #13. I will fix completely and post a new patch.

jhodgdon’s picture

Status: Needs review » Needs work
rdrh555’s picture

Status: Needs work » Needs review
FileSize
5 KB

Redone

jhodgdon’s picture

FileSize
5.42 KB

How about this version? Fixes up a few lingering whitespace, consistency, and standards issues.

rdrh555’s picture

Status: Needs review » Reviewed & tested by the community

Yes it does, thanks for the fixes. Looks great.

Gábor Hojtsy’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

Status: Fixed » Closed (fixed)

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