Is there a way to make it so that node editing pages use the administration theme, but that the preview button will display the node in the sites default theme?

CommentFileSizeAuthor
#1 admin_theme.module.patch576 bytesjessefulton
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

jessefulton’s picture

FileSize
576 bytes

I don't think this is the best approach, but I've attached a patch that will check the $_POST variables and disable the admin theme during content preview.

skks’s picture

It would be great if that functionality would be included in this module. Otherwise you have to create your own administration theme, which would be a big effort, that's not really needed.

pgrond’s picture

It would be great to have the preview in the front-end theme. This is much more intuitive for editors.
The above patch breaks whit translations. Maybe just make the check like this?
if ($_POST && isset($_POST['op']) && $_POST['op'] == t('Preview'))

jrabeemer’s picture

#1 works for me. But I would recommend one add the ability to toggle this as an option.

weri’s picture

OpenPublish (http://openpublishapp.com) has a great switch between the edit- and preview form. They hide all form elements on the preview page and add a modify button. Have a look in the openpublish_core module (openpublish_core.module, openpublish_core.lib.inc and openpublish_core.js).

castawaybcn’s picture

This is a very good idea, however patch in #1 does not work for me in a heavily customized multilanguage content type (several cck fields and a custom tpl.php) I also made a quick try with the modification suggested in #3, but could not appreciate significant differences.

rukaya’s picture

The page preview module http://drupal.org/project/pagepreview seems to work quite well on d6.

kenorb’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.