I'm trying to create a custom page that has a google map in it but I need to add a lot of javascript to the head. I don't want to have it loading in pages its not being used in so I'm not going to add it to the default.master.tpl. Is there a way to create another master - something like map.master.tpl where I can then load the javascript and customise the rest of the page?
Basically I want to these two pages - http://connormccarra.com/test/ and http://connormccarra.com/test/add - working inside the style of my forum (which is using the VanillaBootstrap theme). Any suggestions? I tried the plugins none of them seem to work very smoothly.
Comments
Use custom pages plugin, and set up routes.
Check my air theme in my signature, and click on contact to see what i mean.
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
1 • Off Topic 1Insightful Awesome LOL •You could modify the add menu item plugin.
and just selectively add the javascript to the pages you want based on the $Sender->SelfUrl
it seems simple enough.
But why don't you add the javascript in the test and test/add pages. and selectively add the links to the pages in the default.master.tpl
factoid: Most questions have been previously answered, try the search box first, please provide your Vanilla version Number!
Peregrine's Addons - donations gladly accepted for "successful solutions" and addons - kind of like tipping a waiter at a restaurant
- Spam
- Abuse
- Troll
1 • Off Topic 1Insightful Awesome LOL •I starting messing about with the Custom Pages plugin and I have it setup exactly the way I wanted fairly easily. It takes awhile for you to get round how Custom Pages works. Problem was google maps normally use body onload(), got round it by using the below fix, with a few other changes:
You can see what I have done here: http://poultry.ie/plugin/page/breeders, I have yet to setup routes but all in good time :)
- Spam
- Abuse
- Troll
2 • Off Topic 2Insightful Awesome LOL •I like your add a breeder grab lat and long. Couldnt you use get location. Also validation on submit breeder needs fixing but looks cool. Good work
422 Real Estate Australia , now open Check it out
- Spam
- Abuse
- Troll
1 • Off Topic Insightful 1Awesome LOL •I don't feel get location is accurate enough yet. The way it is now allows the breeder to put the marker right up to their doorstep, so to speak which is very useful for directions.
- Spam
- Abuse
- Troll
0 • Off Topic Insightful Awesome LOL •