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.

eZ debug

Timing: Jan 18 2025 16:14:28
Script start
Timing: Jan 18 2025 16:14:28
Module start 'layout'
Timing: Jan 18 2025 16:14:28
Module start 'content'
Timing: Jan 18 2025 16:14:29
Module end 'content'
Timing: Jan 18 2025 16:14:29
Script end

Main resources:

Total runtime0.6441 sec
Peak memory usage4,096.0000 KB
Database Queries52

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0047 587.9063152.6250
Module start 'layout' 0.00470.0039 740.531339.4453
Module start 'content' 0.00850.6341 779.9766434.9766
Module end 'content' 0.64260.0015 1,214.95318.1641
Script end 0.6441  1,223.1172 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00320.5033160.0002
Check MTime0.00140.2248160.0001
Mysql Total
Database connection0.00040.064110.0004
Mysqli_queries0.595692.4636520.0115
Looping result0.00040.0651500.0000
Template Total0.617795.920.3089
Template load0.00210.325120.0010
Template processing0.615695.576820.3078
Template load and register function0.00020.023610.0002
states
state_id_array0.00050.080710.0005
state_identifier_array0.00100.149420.0005
Override
Cache load0.00180.2723430.0000
Sytem overhead
Fetch class attribute can translate value0.00080.121110.0008
Fetch class attribute name0.00130.207920.0007
XML
Image XML parsing0.00010.019410.0001
class_abstraction
Instantiating content class attribute0.00000.001120.0000
General
dbfile0.00070.1041100.0001
String conversion0.00000.001240.0000
Note: percentages do not add up to 100% because some accumulators overlap

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
2content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
8content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
6content/datatype/view/ezxmltags/line.tpl<No override>design/standard/templates/content/datatype/view/ezxmltags/line.tplEdit templateOverride template
1print_pagelayout.tpl<No override>extension/community/design/community/templates/print_pagelayout.tplEdit templateOverride template
 Number of times templates used: 18
 Number of unique templates used: 5

Time used to render debug report: 0.0001 secs