Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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?
Comment | File | Size | Author |
---|---|---|---|
#1 | admin_theme.module.patch | 576 bytes | jessefulton |
Comments
Comment #1
jessefulton CreditAttribution: jessefulton commentedI 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.
Comment #2
skks CreditAttribution: skks commentedIt 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.
Comment #3
pgrond CreditAttribution: pgrond commentedIt 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'))
Comment #4
jrabeemer CreditAttribution: jrabeemer commented#1 works for me. But I would recommend one add the ability to toggle this as an option.
Comment #5
weri CreditAttribution: weri commentedOpenPublish (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).
Comment #6
castawaybcn CreditAttribution: castawaybcn commentedThis 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.
Comment #7
rukaya CreditAttribution: rukaya commentedThe page preview module http://drupal.org/project/pagepreview seems to work quite well on d6.
Comment #8
kenorb CreditAttribution: kenorb commentedClosed because Drupal 6 is no longer supported. If the issue verifiably applies to later versions, please reopen with details and update the version.