"powered by" on home page only?

Hello everyone,



I’m baffled as to how I can have the “powered by” link in the footer ONLY show on the homepage. On any other page, I’d like it removed.



I can edit/modify it no problem, and I can remove it all together. Is it possible to specify the page/s when it’s visible?



Thanks in advance for any help.

skins/{your skin}/customer/bottom.tpl



You will find this code in the bottom.tpl file:



{if $manifest.copyright}

{$lang.skin_by} {$manifest.copyright}

{/if}

assign the link an id (as you see it above in red)

Use javascript to detect the current url, if its not the home page use

document.getElementById('power_off').style.display='none';

Hopefully this helps you out

Thanks very much for your help! :smiley:

You could also wrap that line with an ‘if’ statement:

```php [COLOR=“Red”]{if $controller == ‘index’}[/COLOR]

{$lang.copyright} © {if $smarty.const.TIME|date_format:"%Y" != $settings.Company.company_start_year}{$settings.Company.company_start_year}-{/if}{$smarty.const.TIME|date_format:"%Y"} {$settings.Company.company_name}. {$lang.powered_by} {$lang.copyright_shopping_cart}


[B][COLOR="red"]{/if}[/COLOR][/B] ```

You could either add it directly to the bottom.tpl or you could use the index:bottom hook available in bottom.tpl; if you use the hook, your changes will not be overwritten in an upgrade.

Bob

Bob definitely has the better way :slight_smile:

Thank you Bob!





Lee Li Pop

Why bump a thread from February to say thank you. What a waste.

Hello Tbirnseth,



You don’t understand why?



1 - It’s a very helpful answer



2 - I can find it faster next time!



3 - I don’t know why Bob Jobosales no longer post



In fact, I have a dream that Bob, one of a few good members, reply me!



You woke me up, my dream is shattered. :frowning:







Lee Li Pop

Yes it is the correct way



Catch the controller and the start the functions that we want to do.



Thanks Bob





Cheers

Perochak