Link as a popup, howto ?

Author Message

David Cuel-Oller

Thursday 28 August 2008 8:46:57 am

Hi,

After trying to find a starting point somewhere around ez sites.. here I am !

I'm trying to figure out how to "simply" open a node or object as a popup !

More in details, what I'm looking for (am I alone in that case ?) :

1/ Insert node/object link to a word or image
2/ Choosing "popup" in the view dropdown
3/ That's all ! The link should open a popup window !

Couple of headaches (javascript window.open si well known)
Should I select a special class for opening a popup ?
Is it possible to open a standart object (article, blog_post...) sometime in a popup and elsewhere inside a "normal" page, it measn inline or embedded ?

Any step-by-step tutos ?

Was it clear ?

Anyway, I think you can found out what I'm talking about, no ?

Thanks in advance for your help !

David

David Cuel-Oller

Thursday 28 August 2008 2:13:58 pm

I'm posting alone... just for myself... Snifff !

Anyway I resolved part of my problem, changing page_layout for my own layout without menu and so on [1]. The next part, the harder one, is to find a solution to give the ability for editor to use this function by choosing a custom type withi a drop down.

Unfortunately when looking for a custom tag to start with, I see that we only have one variable in its scope, $content. To achieve my needs, I need at least 2 vars, le name of the link (title) and the url for the open.window function. (in fact, it could be usefull to add vars for width, height... and so on !

I started to put an onload="resizeTo" within the body tag of my main tpl but in navigators like Firefox, opening a new window open a tab ! And resizing the window means resizing the whole tab set !!!
But it works and IE will save me (for the first time of my life ;-)

Anyone to help me on this topic ?

Thank you,

David

[1] How I made it :
- Create an overall template including needed headers

- adding a specific view for that purpose in extension/ezdhtml/settings/site.ini.append:
In the section
[LinkViewModeSettings]
Add (for a link like purpose)
AvailableViewModes[]=pop # or whatever name you like to use !

- In override.ini.append.php :
[infobox_pop]
Source=pagelayout.tpl
MatchFile=pop/infobox_pop.tpl # Tempate created above. Will replace pagelayout
Subdir=templates
Match[class_identifier]=infobox # for a class type selector
or
Match[node]=5 # In case of a node_id selector

I hope it could help someone and avoid him a hard informations harvesting !

Powered by eZ Publish™ CMS Open Source Web Content Management. Copyright © 1999-2014 eZ Systems AS (except where otherwise noted). All rights reserved.