Autonav external link and lightbox or Popup
Permalink
Hi,
I would like to know if anyone did this already because i have no idea from where to start :
I need to be able to create an external link (link display in autonav) and to open it in a Popup or a lightbox.
If any ideas you are welcome.
Thanks in advance
Chris
I would like to know if anyone did this already because i have no idea from where to start :
I need to be able to create an external link (link display in autonav) and to open it in a Popup or a lightbox.
If any ideas you are welcome.
Thanks in advance
Chris
Hi,
No it's not what i was saying.
Check what i need in attached file.
So you stay in your website and on top (with a lightbox system effect) you have your extarnal page.
Chris
No it's not what i was saying.
Check what i need in attached file.
So you stay in your website and on top (with a lightbox system effect) you have your extarnal page.
Chris
Based on your description and the attachment, you want a lightboxed iframe.
I would look into Magnific Popup. It is built into concrete5 and supports lightboxed iframe use.
Magnific Popup
http://dimsemenov.com/plugins/magnific-popup/...
Magnific Popup Documentation - Iframe Type
http://dimsemenov.com/plugins/magnific-popup/documentation.html#ifr...
I would look into Magnific Popup. It is built into concrete5 and supports lightboxed iframe use.
Magnific Popup
http://dimsemenov.com/plugins/magnific-popup/...
Magnific Popup Documentation - Iframe Type
http://dimsemenov.com/plugins/magnific-popup/documentation.html#ifr...
Hi,
Thats why i thought but i have no idea how to assign a Popup or lightbox to one element of the AutoNav menu ?
I cant assign custom template or plugin to elements of the menu itself.
Any idea
Thats why i thought but i have no idea how to assign a Popup or lightbox to one element of the AutoNav menu ?
I cant assign custom template or plugin to elements of the menu itself.
Any idea
Hey Chris, did you ever figure this one out? I'm trying to do the same thing...
Please met me know if you have useful tips ;)
Thanks,
Luca
Please met me know if you have useful tips ;)
Thanks,
Luca
Hi,
Yes i did it but slightly different.
In fact the customer want me to add Lightbox but straight after the user click on an autonav element. So the new page open first with lightbox.
I didnt use the lightbox straight on Autonav.
Sorry
c
Yes i did it but slightly different.
In fact the customer want me to add Lightbox but straight after the user click on an autonav element. So the new page open first with lightbox.
I didnt use the lightbox straight on Autonav.
Sorry
c
@ZillionProductions
Here is something you can try. It is a custom template based on the Responsive Header Navigation custom template. It will popup external links using Magnific Popup. I did very light testing and it appears to work with some sites depending on their X-Frame-Options.
The changes made are enclosed in comments starting with "CHANGES" and ending with "END CHANGES".
I have attached a copy of the custom template.
Unzip the attached file into application\blocks\autonav\templates.
application\blocks\autonav\templates\responsive_header_navigation_external_popup
Here is something you can try. It is a custom template based on the Responsive Header Navigation custom template. It will popup external links using Magnific Popup. I did very light testing and it appears to work with some sites depending on their X-Frame-Options.
The changes made are enclosed in comments starting with "CHANGES" and ending with "END CHANGES".
<?php defined('C5_EXECUTE') or die("Access Denied."); View::getInstance()->requireAsset('javascript', 'jquery'); // CHANGES View::getInstance()->requireAsset('javascript', 'core/lightbox/launcher'); View::getInstance()->requireAsset('javascript', 'core/lightbox'); View::getInstance()->requireAsset('css', 'core/lightbox'); // END CHANGES $navItems = $controller->getNavItems(); /*** STEP 1 of 2: Determine all CSS classes (only 2 are enabled by default, but you can un-comment other ones or add your own) ***/ foreach ($navItems as $ni) { $classes = array(); if ($ni->isCurrent) { //class for the page currently being viewed $classes[] = 'nav-selected'; }
Viewing 15 lines of 80 lines. View entire code block.
I have attached a copy of the custom template.
Unzip the attached file into application\blocks\autonav\templates.
application\blocks\autonav\templates\responsive_header_navigation_external_popup
When you say popup, do you mean open in a new tab?
You can add external links in the sitemap which will be included in the Auto-Nav block.
- Dashboard > Sitemap > Full Sitemap
- click on the parent page where you want to create the external link
- from the popup menu, select Add External Link
- you will be able to choose the displayed name of the external link, set the external link address, and whether the link should open in a new window (tab)