By jtsnow on
I've been asking in IRC, but nobody has ansered...
In D6, is it possible for my module to specify a different page.tpl.php template to be used by the template engine?
I've been asking in IRC, but nobody has ansered...
In D6, is it possible for my module to specify a different page.tpl.php template to be used by the template engine?
Comments
It should work since the
It should work since the module can implement hook_preprocess_page and make template suggestions. Template may need to be in theme folder though.
Thanks! This works great. I
Thanks!
This works great. I am able to it add template suggestions via $variables['template_files']. However, following a form submission, my template suggestions do not exist. Any reason for this?
What does your
What does your hook_preprocess_page look like?
Ok, this is essentially what
Ok, this is essentially what I am trying to do:
The problem is that neither my global $widgets_mode or $_POST are available in hook_preprocess_page after a form submission. This is strange because they are definitely there in hook_init. Any suggestions?
Is this node related? From
Is this node related? From your original question is sounded like this is related to adding node content of a particular type.
Because of the way form submission and the redirect works, $widgets_mode will never be true after the redirect. If this node related you probably want something like
If not about node content then what is the page trying to display?
No, this is not node related.
No, this is not node related. My module generates "widget" versions of pages. (See http://drupal.org/project/embed_widgets)
It current does not work with web forms. The goal is to allow a user to submit a form and still get a widget-friendly response from the form. So, I need a way to override page.tpl.php after a form submission.
Problem solved. I am able to
Problem solved. I am able to check $_SERVER['HTTP_REFERER'] to see if the referring URL contains widgets_mode=true.