I connected the node-add forms for two different content types using pageroute. Each form was themed using a custom .tpl.php, per How to Theme CCK Input Forms. When I browse to the pageroute, the theming from the custom .tpl.phps is not applied. How can node-add forms be themed within a pageroute?

A contrived example:
- Two content types, plant and animal.
- Themed pages /node/add/plant and /node/add/animal
- Pageroute /mypageroute containing /node/add/plant and /node/add/animal (as node adding forms.)

When browsing node/add/plant, the themed form appears. When browsing /mypageroute, the node-adding form for plant is displayed in the default, unthemed way.

Comments

bcn’s picture

Category: support » bug

I am having the same issue... Were you able to find a solution for this?

@fago Is it possible to theme lonely nodes?

threexk’s picture

Ended up abandoning pageroute and writing a quick-and-dirty module to redirect to the second form upon completion of the first form. Don't know if it'll help in your case, but here's the module code:

// $Id$

function redirect_plant_nodeapi(&$node, $op, $a3=NULL, $a4=NULL) {
    switch ($op) {
        case 'insert':
            if ($node->type == 'plant') {
                $_REQUEST['destination'] = 'node/add/animal';
            }
    }
}

I am still fairly new to Drupal and PHP, so I'm not totally sure how the $_REQUEST line works -- I got it from a comment in another issue.

Tauran’s picture

Status: Active » Closed (fixed)

Please reopen if the request persists.