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

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