drupal - Suggesting different templates when theming a node form -


function posts_theme($existing, $type, $theme, $path) {   return array(       'post_node_form' => array(         'arguments' => array('form' => null),         'template' => variable,       )   ); } 

this way of suggesting template render 'post_node_form' in drupal 6. want node editing form 2 different paths:

  • via ajax through drupal_get_form('post_node_form')
  • via default node/add/post

if replace "variable" depending on path (or whatever other condition), not work because seems? name of template cached , need flush caches refresh it.

any solution of suggesting different form templates?

note. not case of node template, (then can put template suggestions in preprocess hooks). it's node form.

add function/or modify if exists template.php of theme:

function phptemplate_preprocess_page(&$vars) {   // ...   $node = menu_get_object();   if ($node->type == 'post') {     $vars['template_files'][] = variable;   }    // ... } 

Comments

Popular posts from this blog

apache - Add omitted ? to URLs -

redirect - bbPress Forum - rewrite to wwww.mysite prohibits login -

php - How can I stop spam on my custom forum/blog? -