Hi everyone, I am trying to figure out how to add a piece of code to my homepage html. Also, is there a way to apply this code to every single page on my site? Thanks
Does your code consist of smarty variables?
Html Code or PHP code?
—
Valentin
It is HTML code… a script
I have to add the script as the last thing on my default page before the tag.
I have to add the script as the last thing on my default page before the tag.
[list=1]
[]add file skins/basic/customer/addons/my_changes/hooks/index/footer.post.tpl with the content you need (cs-cart 3.x pro)
[]clear cache (?cc)
[/list]
Be careful with code, you need to replace [color=#ff0000]{ [/color]with [color=#008000]{$ldelim}[/color] and [color=#ff0000]} [/color]with [color=#008000]{$rdelim}[/color] or
```php
{literal}
{/literal}
``` but inside {literal} you cannot use smarty variables
I hope that helps,
—
Valentin
[quote name='Vali' timestamp='1369857829' post='162679'][list=1]
[]add file skins/basic/customer/addons/my_changes/hooks/index/footer.post.tpl with the content you need (cs-cart 3.x pro)
[]clear cache (?cc)
[/list]
Be careful with code, you need to replace [color=#ff0000]{ [/color]with [color=#008000]{$ldelim}[/color] and [color=#ff0000]} [/color]with [color=#008000]{$rdelim}[/color] or
```php
{literal}
{/literal}
``` but inside {literal} you cannot use smarty variables
I hope that helps,
—
Valentin
[/quote]
Ok I have created the file skins/basic/customer/addons/my_changes/hooks/index/footer.post.tpl but my code doesnt look like the format you showed. Maybe it is because my code is javascript? I forgot to mention thay. Sorry I dont know anything about coding so Im not sure what is relevant and what is not.
The code to be listed only on homepage please add
{if $controller=='index'}
...
{/if}
[quote name='Vali' timestamp='1369909212' post='162717']
The code to be listed only on homepage please add
{if $controller=='index'}
...
{/if}
[/quote]
Ok I will try that but why only homepage? I wanted to put it on all pages.
Because your topic is called [quote]Add code to homepage html?[/quote]
[quote name=‘Vali’ timestamp=‘1369983301’ post=‘162782’]
Because your topic is called
[/quote]
I am unable to get it to work that way. It works when I put it into an html block but then it disables the banners on my page.