You can check if it is the home page from your custom template:
https://forum.x-cart.com/showthread.php?t=73877
But the better way would be checking this in a widget class that renders the template (if there is one) and changing the template path returned in getDefaultTemplate() method accordingly.
You may also check this article:
http://kb.x-cart.com/display/XDD/How+to+find+out+what+page+is+currently+running