Forums / Developer / Triggering a modal popup window from link

Triggering a modal popup window from link

Author Message

Cristina Carvalho

Sunday 12 December 2010 6:50:57 am

Hello all and thank you in advance for your attention,

I have just accepted a task of editing an ez publish based website and I have barely any time to learn all of its principles. I need to add a link to a page and make it open a modal popup window with a contact form.

The contact form is in an iframe, I just need to know the best way to add a modal popup window to an ez publish template.

I'm familiar with solutions like jquery lightbox or fancybox, but I don't know how to integrate them with the ez publish cms, can you provide me any tips on this matter?

Thank you kindly.

Łukasz Serwatka

Sunday 12 December 2010 3:33:45 pm

Hi,

The contact form you have mentioned, is it a eZ Publish contact from or a custom script? Start from locating a template where you want to add a link with JavaScript listener bind to it. Then use jQuery or whatever lib you pref for displaying modal view. Turn on debug output with enabled list of used templates.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

Cristina Carvalho

Monday 13 December 2010 4:14:25 am

"

Hi,

The contact form you have mentioned, is it a eZ Publish contact from or a custom script? Start from locating a template where you want to add a link with JavaScript listener bind to it. Then use jQuery or whatever lib you pref for displaying modal view. Turn on debug output with enabled list of used templates.

"

Hello, thank you for your answer :) I managed to implement jquery.fancybox modalpopups, my current issue is that the form is precisely a eZ Publish contact form and I don't know how to isolate the form from its template. How can I know which templates are being called on each address? Where do I define such conditions?

Łukasz Serwatka

Monday 13 December 2010 5:07:46 am

What you can do is to pipe it over the custom pagelayout using layout/set module. eZ Publish comes with popup dedicated pagelayout (located in design/standard/templates/popup_pagelayout.tpl). Try something like www.example.com/layout/set/popup/URL_TO_CONTACT_FORM. Take a look on settings/layout.ini for more info as well as use concat() and ezurl() template functions.

Personal website -> http://serwatka.net
Blog (about eZ Publish) -> http://serwatka.net/blog

eZ debug

Timing: Jan 17 2025 21:18:38
Script start
Timing: Jan 17 2025 21:18:38
Module start 'content'
Timing: Jan 17 2025 21:18:39
Module end 'content'
Timing: Jan 17 2025 21:18:39
Script end

Main resources:

Total runtime1.1607 sec
Peak memory usage4,096.0000 KB
Database Queries197

Timing points:

CheckpointStart (sec)Duration (sec)Memory at start (KB)Memory used (KB)
Script start 0.00000.0068 601.8750180.8203
Module start 'content' 0.00681.0652 782.6953603.0625
Module end 'content' 1.07190.0887 1,385.7578336.9766
Script end 1.1606  1,722.7344 

Time accumulators:

 Accumulator Duration (sec) Duration (%) Count Average (sec)
Ini load
Load cache0.00380.3271210.0002
Check MTime0.00150.1287210.0001
Mysql Total
Database connection0.00100.088310.0010
Mysqli_queries1.091194.00771970.0055
Looping result0.00150.13341950.0000
Template Total1.135597.820.5678
Template load0.00190.162920.0009
Template processing1.133697.667920.5668
Template load and register function0.00010.009910.0001
states
state_id_array0.00090.078410.0009
state_identifier_array0.00090.077220.0004
Override
Cache load0.00170.1427220.0001
Sytem overhead
Fetch class attribute can translate value0.00080.072630.0003
Fetch class attribute name0.00100.090060.0002
XML
Image XML parsing0.00340.295830.0011
class_abstraction
Instantiating content class attribute0.00000.001580.0000
General
dbfile0.00570.4938350.0002
String conversion0.00000.000730.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
1node/view/full.tplfull/forum_topic.tplextension/sevenx/design/simple/override/templates/full/forum_topic.tplEdit templateOverride template
4content/datatype/view/ezimage.tpl<No override>extension/sevenx/design/simple/templates/content/datatype/view/ezimage.tplEdit templateOverride template
4content/datatype/view/ezxmltext.tpl<No override>extension/community_design/design/suncana/templates/content/datatype/view/ezxmltext.tplEdit templateOverride template
5content/datatype/view/ezxmltags/paragraph.tpl<No override>extension/ezwebin/design/ezwebin/templates/content/datatype/view/ezxmltags/paragraph.tplEdit templateOverride template
1content/datatype/view/ezxmltags/quote.tpldatatype/ezxmltext/quote.tplextension/ezwebin/design/ezwebin/override/templates/datatype/ezxmltext/quote.tplEdit templateOverride template
1pagelayout.tpl<No override>extension/sevenx/design/simple/templates/pagelayout.tplEdit templateOverride template
 Number of times templates used: 16
 Number of unique templates used: 6

Time used to render debug report: 0.0001 secs