Active
Project:
Pageroute
Version:
5.x-1.1
Component:
Code
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
2 Mar 2009 at 06:37 UTC
Updated:
22 Mar 2010 at 15:56 UTC
Hello, I've got my registration process setup using a pageroute. The 2nd step of the pageroute goes to the add nodeprofile form, and I would like to theme it per this guide: http://drupal.org/node/101092 However, the override isn't working. As far as I can tell, it's because the override relies on arguments passed through the URL, which aren't there with the pageroute setup. I've only been able to find one solution, but it involves using a small hacked-together module instead of pageroute (http://drupal.org/node/237225). How can I get this to work using pageroute? I really need to be able to theme the nodeprofile form.
Code used in template.php:
//Profile-Add Override//
// Add Form
if ((arg(0) == 'node') && (arg(1) == 'add') && (arg(2) == 'profile')){
function phptemplate_node_form($form) {
return _phptemplate_callback('node-profile-add', array('user' => $user, 'form' => $form));
}
}
Comments
Comment #1
tannerjfco commentedUpdate: As I've received no help on this matter, I've continued to try a couple things. I did find in regards to another module (og user roles) which also affects the form's arguments, that I am able to get template.php to override the specific form id value. Example:
However, when I try something similar pageroute, it still ignores it!
I found the Drupal for Firebug module and was able to also find the form "pageroute_page_step2_form" in effect. I tried overriding this as well with no luck. I also tried overriding "$form['page_form']['#id'] == 'profile_node_form" with no luck.
I am absolutely confused as to why pageroute is killing *any* override I try to make. Using the Profile Add Override code example above works flawlessly when viewing the node profile outside of pageroute. I would very much appreciate any help that could be offered with this, as I am at a loss.
Comment #2
matei lazar commentedI'm not sure if this help, but I had a similar issue in Drupal 6. I changed the node editing form for a content type, and the changes didn't show in the pageroutes created. I've managed to solve this by commenting the following line of code:
$form['#theme'] = 'pageroute_embedded_form_reuse';
line 174 in pageroute.module.
I'm not sure yet what other things went wrong because of this :D