Closed (fixed)
Project:
Drupal core
Version:
6.4
Component:
base system
Priority:
Normal
Category:
Support request
Assigned:
Unassigned
Reporter:
Created:
10 Jul 2009 at 15:56 UTC
Updated:
17 Feb 2010 at 17:40 UTC
Is there a way to create a simple pop-up window with no theme navigation?
Thx,
John
Comments
Comment #1
rajanimadhu commentedSame problem,anyone pls help.
Comment #2
wildmtsky commentedI 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.
Comment #3
japanitrat commentedsee 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.
Comment #4
scott_earnest commentedNot 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()?>Comment #5
japanitrat commenteddoes this produce proper HTML?
Comment #6
scott_earnest commentedI 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.
Comment #7
japanitrat commentedi 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.
Comment #8
jebernier commentedComment #9
jshuster@drupal.org commentedAll 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.
Comment #10
jshuster@drupal.org commentedSetting 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!