Insert Javascript on Home Page Only

I am wanting to insert some javascript into the head tag of the home page ONLY. Is there a way to do this with CS-Cart using an if statement? If so, can someone please pass that along?



Thanks!

[quote name=‘knoxbury’]I am wanting to insert some javascript into the head tag of the home page ONLY. Is there a way to do this with CS-Cart using an if statement? If so, can someone please pass that along?



Thanks![/QUOTE]

create a file named skins/customer/addons/my_changes/hooks/index/styles.post.tpl with the following code:

```php

{if $controller == ‘index’ and $mode == ‘’}

{literal}


{/literal}

{/if}

```

[quote name=‘tbirnseth’]create a file named skins/customer/addons/my_changes/hooks/index/styles.post.tpl with the following code:

```php

{if $controller == ‘index’ and $mode == ‘’}

{literal}


{/literal}

{/if}

```[/QUOTE]



Thanks, but I’ve given up on hooks . . . too hard to understand and implement. CS-Cart should make this aspect of their cart much easier to manage.

It’s really quite simple once you do one. Try the above. The only thing you have to do is create a file in the proper place. Go for it!