Is there a way to create a simple pop-up window with no theme navigation?

Thx,

John

Comments

rajanimadhu’s picture

Same problem,anyone pls help.

wildmtsky’s picture

I was just thinking about this too! But so far the only thing I can think of is to create a separate html page. Keep me in the loop if anyone has a better idea. There must be a way to disable the theme for pop ups.

japanitrat’s picture

see Sections module. Define a new subtheme (a theme that inherits from your main theme), remove all unneeded regions, add the subtheme to sections for the desired pages.

scott_earnest’s picture

Not sure how legit it is, but you can put a php die() statement at the end of your content for the popup. It will strip out the theme and output only what you have in the body of the node. Make sure that your input format is set to PHP code.
<?php die()?>

japanitrat’s picture

does this produce proper HTML?

scott_earnest’s picture

I did include doctype and html/body tags in the popup. Is that what you meant by proper?

Also, I called some api functions like drupal_get_html_head() and drupal_get_js() which were needed for my purpose.

Again, not sure how "legit" this method is, just posting a possible solution that may help someone.

japanitrat’s picture

i mean, does it end well? (like )

a die() stops the execution of a script. Therefore it stops the Drupal flow from being fully executed. It's not a good practice and I wonder if the output even validates.

jebernier’s picture

Status: Active » Fixed
jshuster@drupal.org’s picture

All the theme content is defined in the page template, so if you can set up a URL-specific page template and strip out the unneeded parts, this might work.

jshuster@drupal.org’s picture

Setting up a page template suggestion works very nicely.

Template suggestions are well-documented at http://drupal.org/node/190815 and the page immediately before it. Assuming you want to create a pop-up at a specific URL, such as example.com/help/popup, go to your theme folder and find page.tpl.php. Copy this into the same directory under the name page-help-popup.tpl.php. Then, edit the new template suggestion file to strip out everything you don't want in your popup window.

Less than a half-hour to read the documentation and make the changes ... very nice solution!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.