By avior on
Hi
I am using calendar module to display events (custom node type 'event') on month view
is it possible to open a popup window when the user clicks the day (or event) that doesn't have the theme but have the event data displayed ?
if i use node-event.tpl.php file i can only change the display of the event content.
Thanks
Avior
Comments
Perhaps try thickbox?
Perhaps try thickbox?
Popups in Drupal 5
First, I don't speak english very well. I will try you understand me.
Recently I found the way to display node data (or anything content) in a popup.
First Step.
You should have a menu item in a custom module with the path for show popups, for example:
If you enter now to popup/contact you can see "hello buddy" in a default theme, with the blocks and menus.
Second step.
Create a file in theme folder, page-popup.tpl.php
In this file you can delete menus regions, sidebar regions, help, mission, etc. Just leave $content and $message.
The template engine will use this file for all page contain "popup" in the url arguments, like "popups/event", "popups/event/1".
Then you can display custom popup.
In your case, you can create a custom path and load/view the node in the popup.
I hope you understand, and i hope this help you.
thanks dario, worked nicely
thanks dario,
worked nicely for me, just had to change
window.open(this.this, this.target,
TO
window.open(this, this.target,
Need a bit more help
So I understand what you're doing here dario and thanks so much for putting this together. I guess I'm just a bit fuzzy on where these things should go. Could you provide the file name and locations for each piece of code?
Thanks again.
found this one
Take a look here
http://drupal.org/node/148309
Dev Art- Drupal Based Services and development
Popup Module
Sry, but i´m a nub,
and my english isn´t well, too.
I do not understand the instructions at all, or only partially.
As the first step I have put on a .module and an .info file. I copy in
I called it popup.module and popup.info and uploads it to /modules/popup
Then I have installed the module about module management.
Then i copy my page.tpl.php, deletes all and just leave
and saved as page-popup.tpl.php
I have understood your explanation in such a way that it would already have to function with it. So I give a Menu Item the path to url popup/contact
But nothing happens.
I try a few diffrent links like your examples, but nothing happens.
Your operation :
Then you can display custom popup.
l("popup", "popup/contact", array("target" => "_blank", "onclick" => "window.open(this.this, this.target, 'width=800,height=600'); return false;"));In your case, you can create a custom path and load/view the node in the popup.
i don´t understand completly. What should it be, Javascript? an replacement? What ist the l in front, a variable?
Plz help me somewhere and explane me exactlier, becouse I thing, thats is what I need.
Greets
Karsten
P.S.: I use Drupal 5.7
Thanx!
With some small modifications for Drupal 6.6, I managed to get this to work.
Thanks for your stubs...
For anyone interested in the 6.6 version, here they are:
popup.module;
Don't forget to create popup.info. Also create the node-popup.tpl.php in your theme directory as well...
To access the popup, have this somewhere in your body.
all the time then i'm using
all the time then i'm using this code i have the same output in popup
hello popup!
Why?
i have tried to put:
"popup/$nid"
"popup/mynode"
the same result.
please, help, and sorry for my english.