-
- 44 Posts
My site is setup and very simple, I have a Home, About Us and Contact page working with Wayfinder creating the navigation menu.
How do I add a link called "Purchase" to the menu that pops up in a new window 500x500?
There are several ways you could do this. You could
add the link with Javascript. You could make a resource for it, making it into a categoryFolder, using the
categoryFoldersTpl to give it whatever form the popup Javascript expects. You could add it at the end of your menu by manipulating Wayfinder's
outerTpl, putting whatever the Javascript for creating the popup expects in that element...
<ul>
[[+wf.wrapper]]
<li class="popup">Purchase</li>
</ul>
-
- 44 Posts
thank you sottwell... ideally I'd like to add the link as a resource so I can change the order it appears in the navigation.
To be honest I am a bit lost... my other menu items in wayfinder link to index.php?id=1, index.php?id=2, index.php?id=3, etc. and I understand I can add a resource link to this other non-modx directory on my server... is there a way I can add javascript to a resource?
hope that makes sense
Put the Javascript and CSS links in the site template. MODx doesn't care anything about your Javascript. Just make sure you're linking to the .js files properly.
If you want to use a resource for this, use Wayfinder's &categoryFoldersTpl and put rel="category" in the resource's Link Attributes field. What you use for the chunk for the categoryFoldersTpl depends on what the Javascript you're using for your popup expects.