Shape 5

Joomla Templates => CleanOut - Club => : webmeup May 23, 2017, 03:59:00 PM



: Custom Javascript for Age Verification
: webmeup May 23, 2017, 03:59:00 PM
I'm trying to add a custom page for age verification on every page. However, I'm looking at the index.php file and there is a ton of code there.

Can you please direct me to where I should add my custom js/css/html so I can display that before displaying any pages on the site (including the main page)?

Ideally, I'd just like to have a modal dialog be displayed with the options that overlays the page.  I assume there is existing code to display a popup in Vertex?

Any help would be greatly appreciated.

Thanks


: Re: Custom Javascript for Age Verification
: jonahh May 24, 2017, 02:36:32 PM
Hello,

To do a popup as you describe would require custom coding and there isn't really a popup available to do so in Vertex. Perhaps you could use multibox or s5box to trigger it though. I'm not sure.

You can add JavaScript code right in the Joomla admin area of Vertex. I believe its under the General tab.


: Re: Custom Javascript for Age Verification
: webmeup May 24, 2017, 04:14:25 PM
I don't have a problem with custom coding. 

What I need to know is where to insert the code so it gets executed after the page loads so it doesn't interfere with the theme.

Can you help direct me toward that?

Thanks


: Re: Custom Javascript for Age Verification
: jonahh May 25, 2017, 12:43:58 PM
Yes its where I stated in the backend admin area of Vertex. You just go to the template manager in Joomla and click on the cleanout template. Make sure you are on the latest version of Vertex and then in the General tab you'll see the area you can add it. 

Or you can also add it in the index.php file at the bottom before the closing body tag too.