Patch to Add/Edit theme switcher

krishnap - May 12, 2008 - 14:55
Project:Taxonomy Theme
Version:5.x-1.1
Component:- Taxonomy
Category:feature request
Priority:normal
Assigned:krishnap
Status:needs review
Description

The following snippet switches the theme layout for both ADMIN and when a user is editing or creating new content.

Look base http://drupal.org/node/154091.

SVN
/**
* function _taxonomy_theme_select_nodetype().
* (nodetype-based theme selection)
*/
function _taxonomy_theme_select_nodetype(&$theme_method, &$custom_theme, $default_theme, $uri) {
if ((arg(0) == 'node') && is_numeric(arg(1)) {
$nid = arg(1);

CHANGE TO

/**
* function _taxonomy_theme_select_nodetype().
* (nodetype-based theme selection)
*/
function _taxonomy_theme_select_nodetype(&$theme_method, &$custom_theme, $default_theme, $uri) {
if ((arg(0) == 'node') && is_numeric(arg(1)) && !((arg(1) == 'add') || (arg(2) == 'edit')) ) {
$nid = arg(1);

 
 

Drupal is a registered trademark of Dries Buytaert.