Many programmers want to put a script in joomla template that only run at home page. I recommend here two solution that i get from digital point forum:
1. Solution 1
you can simply put a module position and make it only display on frontpage. When this module display, it means we are on front page. Put a code of javascript here. For example: you have a funtion myonload() {...}; put in the area of this module. Hope that help you!
2. Solution 2
Put this code between tag of template:
getActive() == $menu->getDefault()) { ?>
Responses
0 Respones to "How to detect template is on frontpage in joomla?"
Post a Comment