Forums / Setup & design / Link as a popup, howto ?

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 !

eZ debug

Timing: Jan 18 2025 11:30:27
Script start
Timing: Jan 18 2025 11:30:27
Module start 'content'
Timing: Jan 18 2025 11:30:27
Module end 'content'
Timing: Jan 18 2025 11:30:27
Script end

Main resources:

Total runtime0.2408 sec
Peak memory usage2,048.0000 KB
Database Queries141

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0081 587.7031180.8438
Module start 'content' 0.00810.0047 768.546993.7578
Module end 'content' 0.01290.2279 862.3047523.0234
Script end 0.2408  1,385.3281 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00321.3379200.0002
Check MTime0.00130.5309200.0001
Mysql Total
Database connection0.00090.387910.0009
Mysqli_queries0.189778.76131410.0013
Looping result0.00170.68721390.0000
Template Total0.227694.510.2276
Template load0.00070.301910.0007
Template processing0.226994.214610.2269
Override
Cache load0.00050.211810.0005
Sytem overhead
Fetch class attribute can translate value0.00100.413110.0010
XML
Image XML parsing0.00040.163310.0004
General
dbfile0.00190.8050200.0001
String conversion0.00000.004230.0000
Note: percentages do not add up to 100% because some accumulators overlap

CSS/JS files loaded with "ezjscPacker" during request:

CacheTypePacklevelSourceFiles
CSS0extension/community/design/community/stylesheets/ext/jquery.autocomplete.css
extension/community_design/design/suncana/stylesheets/scrollbars.css
extension/community_design/design/suncana/stylesheets/tabs.css
extension/community_design/design/suncana/stylesheets/roadmap.css
extension/community_design/design/suncana/stylesheets/content.css
extension/community_design/design/suncana/stylesheets/star-rating.css
extension/community_design/design/suncana/stylesheets/syntax_and_custom_tags.css
extension/community_design/design/suncana/stylesheets/buttons.css
extension/community_design/design/suncana/stylesheets/tweetbox.css
extension/community_design/design/suncana/stylesheets/jquery.fancybox-1.3.4.css
extension/bcsmoothgallery/design/standard/stylesheets/magnific-popup.css
extension/sevenx/design/simple/stylesheets/star_rating.css
extension/sevenx/design/simple/stylesheets/libs/fontawesome/css/all.min.css
extension/sevenx/design/simple/stylesheets/main.v02.css
extension/sevenx/design/simple/stylesheets/main.v02.res.css
JS0extension/ezjscore/design/standard/lib/yui/3.17.2/build/yui/yui-min.js
extension/ezjscore/design/standard/javascript/jquery-3.7.0.min.js
extension/community_design/design/suncana/javascript/jquery.ui.core.min.js
extension/community_design/design/suncana/javascript/jquery.ui.widget.min.js
extension/community_design/design/suncana/javascript/jquery.easing.1.3.js
extension/community_design/design/suncana/javascript/jquery.ui.tabs.js
extension/community_design/design/suncana/javascript/jquery.hoverIntent.min.js
extension/community_design/design/suncana/javascript/jquery.popmenu.js
extension/community_design/design/suncana/javascript/jScrollPane.js
extension/community_design/design/suncana/javascript/jquery.mousewheel.js
extension/community_design/design/suncana/javascript/jquery.cycle.all.js
extension/sevenx/design/simple/javascript/jquery.scrollTo.js
extension/community_design/design/suncana/javascript/jquery.cookie.js
extension/community_design/design/suncana/javascript/ezstarrating_jquery.js
extension/community_design/design/suncana/javascript/jquery.initboxes.js
extension/community_design/design/suncana/javascript/app.js
extension/community_design/design/suncana/javascript/twitterwidget.js
extension/community_design/design/suncana/javascript/community.js
extension/community_design/design/suncana/javascript/roadmap.js
extension/community_design/design/suncana/javascript/ez.js
extension/community_design/design/suncana/javascript/ezshareevents.js
extension/sevenx/design/simple/javascript/main.js

Templates used to render the page:

UsageRequested templateTemplateTemplate loadedEditOverride
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 1
 Number of unique templates used: 1

Time used to render debug report: 0.0001 secs