Jump to content

Archived

This topic is now archived and is closed to further replies.

cf666

modal triggered from menu item?

Recommended Posts

cf666    0
cf666

Hi all,

 

Just wanted to know if it's possible to trigger a modal (that opens up a google docs form, essentially an external link) directly from a menu item (in the nav).

 

I've seen other threads that show how to trigger modals from links, etc, but I just can't figure out how to make that happen from a menu item... except using a plug in like Easy Modal, which I've tried and I don't like how their modal doesn't center in the viewport on mobiles (or how their modal looks either, designwise).

 

So if I have this markup to trigger the modal:

<a class="texttrigger" href="#myModal" data-toggle="modal"><img goes here></a>

 

And then this for the modal itself:

 

<div class="modal hide fade" id="myModal" tabindex="-1" role="dialog">
<div class="modal-header">
<button class="close" type="button" data-dismiss="modal">×</button>
<h3 id="myModalLabel">The modal's title</h3>
</div>
<div class="modal-body">
<iframe src="https://docs.google.com/spreadsheet/embeddedform?formkey=dHFycFNoUk5XMHJtdUxrUlRXSVJLYVE6MQ" width="760" height="1051" frameborder="0" marginheight="0" marginwidth="0">Cargando...</iframe></div>
</div>
 
How can I adapt this to a menu item?
Any help would be immensely appreciated!

Share this post


Link to post
Share on other sites
Rob    547
Rob

Go to Dashboard > Appearance > Menus and click "Screen Options" on the top, right. A new panel will open.  Check the box for CSS Classes, then click the Screen Options button again.

 

Now, go to Menus > Custom Links (same page).   Create a menu link with the Link ONLY -- #myModal

 

Add the class title in the new CSS Class field -- texttrigger

 

If you're using an image instead of text for this link, enter the HTML for the image link in the LABEL field - <img src="....

 

Save the menu item.

 

Make sure your CSS is as described in your post.

 

Now that menu item should link, calling the CSS for the modal.


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
cf666    0
cf666

Firstly:

Rob: I LOVE YOU for replying so quickly!!!!!!!!!!!!!

 

Now, I'm a bit confused:

 

When creating the Custom Link menu item, do I enter literally "#myModal" (without the quotes, of course) in the URL field?

The markup I referenced above I had it applied to a button within the body of a page I'd created.

Now that page (and the button within it) wouldn't exist, since the external link that the button triggered will now be triggered by the Custom Link on the menu, right?? So the "#myModal" string wouldn't be referencing anything that exists anywhere on any page! I'm totally confused...

 

By the way, I'm not sure what you mean by "Make sure your CSS is as described in your post" (I'm assuming you meant the HTML, not the CSS?).

 

Please clarify for this clueless beginner...

Thanks a million!!

 

Carina

Share this post


Link to post
Share on other sites
Rob    547
Rob

Well, first let me say... even I'm surprised it sorta worked. We did get a modal. It just doesn't contain anything. That's my fault, for being quite weary today. I confused all those divs, somehow with CSS.  Apologies. 

 

Somehow we need to call that stuff into the link.  I'm not sure how and our support team really won't be back till Wednesday.  Tomorrow morning, I'll reach out to one of my colleagues to see if there's a solution for calling the modal to open with content. 

 

In Firebug, the modal link is calling a google spreadsheet, but it's doing so as an href link (a normal URL link) instead of as an iframe (which Menus don't normally do).


Former PageLines Moderator, Food Expert and Raconteur

Share this post


Link to post
Share on other sites
cf666    0
cf666

It didn't work.

The modal you're seeing is an ugly one that is the product of a plugin called "Easy Modal".

I much prefer the design of the Pagelines modals, especially because they load correctly in the viewport so they can be seen entirely (as opposed to this one which in mobiles gets cut off).

I'm using these Easy Modals to make do for the time being but I hope you guys can tell me how to use the Pagelines modals...

 

Please let me know when you find out.

Thanks, Rob!

 

Carina

Share this post


Link to post
Share on other sites
Danny    1,327
Danny

Hi Carina,

 

The PageLines modal is actually a Bootstrap modal and its not possible as far as I know to trigger the modal from a menu item. I recommend you contact one of our Pros, as they may be able to help you.

 

http://www.pagelines.com/pros/


Please search our forums, before posting!

Share this post


Link to post
Share on other sites
Shane Holloman    1
Shane Holloman

Any update if this is possible yet?


Shane Holloman

IT Specialist | Digital Artist | Web Developer

http://unitedsaints.com

+1(424) 218-6853

 

Share this post


Link to post
Share on other sites

  • Similar Content

    • khat
      By khat+
      I think I may have installed pagelines pro incorrectly, and then used features incorrectly. I installed first platforms framework theme and then the child, thinking I could do setup for child later. I tried to set up a background image, and tried custom css feature in pagelines dashboard. I had mistakes in my css, and just thought that if I deleted the info in the css custom feature in pagelines dashboard that the new information would overwrite the old info. The background image didn't respond at all, probably because I didn't have the child directory renamed. I then tried to use the LSS plugin to create css and added more css, possibly, somewhere -sigh-. I never did change the background image and get it placed properly. I used a workaround and in nested containers I placed a background image which worked well enough, so I moved on to try to create my nav bar/ menu bar. When I go to the Menus panel, there is NO area where I can place a menu on a page. I have read and reread and re- re- reread the instructions for placing a menu. I've used the pagelines editor to place a menu, however only HOME shows up. I've been at this for many hours. I've since uninstalled all of my pagelines items and reinstalled, thinking that it would restore all my changes to default, but no, it is still all there, with all my unresolved issues. I am completely at a loss as to what to do next.
    • Jarek
      By Jarek+
      How to make the Impulse menu sticky?
      Here is a site that seems like it is doing just that: http://www.manhattanperiodontist.com/
      Here is the site I am working on: http://boeriu.digitalvector.com/ 
      I have no problem showing the menu at the bottom, but when scrolling up it does not stick.  I tried to add Nav Pro menu but when I do that, it just shows on top and no matter what I try is not working as I want it to.
      Any suggestions?
    • Dave
      By Dave+
      1) Toggle menu on mobile devices does not work properly, combination Chrome 56.0.2924.87 with Android 6.0.1

      2) Mobile / Default Menu > Set the primary/default navigation for your site. This will be used in the pop out mobile menu and as the default in navigation sections. Does not work.
    • David
      By David+
      We are building a long-page scrolling site with Pagelines 5. Our menu is made with # links that go to a container's unique ID, e.g. container_ux7al6g
      This works, but it doesn't look great in the menu. Is it possible to assign a 'nice' # link, e.g. /#solutions ? 
      We used to do this in the DMS2 platform through a workaround, but that doesn't seem to be possible now. 
      Any suggestions? 
    • yemoonyah
      By yemoonyah+
      I just installed and added the Flipper section to my home page and it makes my navigation/menu bar items disappear.
      They do show up again when scrolling down and everything seems normal on the other pages.
      http://yemoonyah.com
      Thanks.
       
×