Download & Extend

Apply the custom theme choice to node sub-pages

Project:Node type theme
Version:6.x-1.x-dev
Component:Code
Category:feature request
Priority:normal
Assigned:Unassigned
Status:reviewed & tested by the community

Issue Summary

The module currently checks that there isn't an arg(2), so the custom theme would apply to node/21, but not node/21/edit, node/21/revisions, etc.

The attached patch:

  • Applies the custom theme to all sub-pages of node/nn
  • Allows administrators to choose whether the custom theme should be applied to node/nn/edit
    (as this can often be seen as a different use-case)
  • Some code-cleanup, switching from arg(1) and node_load functions to entity-loading using menu_get_object()

Is this patch something you could merge into dev? Although it is an additional feature, I think it fits well with the simplicity of the module, and fulfills a need I've seen on a number of client sites.

AttachmentSize
nodetypetheme.apply_to_edit_pages_too.patch5.61 KB

Comments

#1

Status:active» needs review

#2

sub.

#3

New patch: this one applies to both 'add' and 'edit' pages (previous patch only applied to 'edit' pages).

AttachmentSize
nodetypetheme.apply_to_edit_pages_toob.patch 5.67 KB

#4

And a third version of the patch: this one adds improved help for administrators, fixes the implementation on node/add pages (that'll teach me to submit code without tests!) and a set of tests.

AttachmentSize
nodetypetheme.apply_to_edit_pages_c.patch 21.9 KB

#5

Status:needs review» reviewed & tested by the community

We are using this patch in a project and can verify that that latest version works as advertised.