Quick Tempcode Question
Posted
#3313
(In Topic #649)
So for example.
Posted
I've implemented a site-tutorial system using Javascript. So when the user visits a certain page, the JS function is called and overlays pop up on the screen showing the user what each area of the site does. Problem is, I'm calling this function via the Comcode page I want it to show on, and due to limitations I cannot show overlays beneath the location of where I'm calling the script (currently in a Comcode page). I want to be able to add overlays in the footer to explain to users how to use the features located in these areas.
I can't call the JS function in GLOBAL_HTML_WRAP.tpl because then it will show on every page in every zone - I just want to display this Javascript functionality when a user visits a single page.
Posted
If you need to also restrict it by zone, then something like this:
Just replace zone_name and comcode_page_name with the name of the zone and page you want to match.
Note: This was not tested. I think I got the syntax right and all the symbols, brackets, and commas placed correctly.
Tip: If you aren't sure about what to use for zone_name or comcode_page_name, just put the forum and topicview tempcode symbols somewhere in your comcode page or footer temporarily so you can see what the zone and page names are.
1 guest and 0 members have recently viewed this.
