insert a hook in search.tpl

How to insert a hook to override this line of code in the common_templates/search.tpl file, line 28 (2.1.4 CE):

{include file="buttons/go.tpl" but_name="search.results" alt=$}

What I have in mind is to make it point to a this “go-custom.tpl” file stored in my_changes folder,

Thanks in advance.


{hook name="buttons:custom"}
{include file="buttons/go.tpl" but_name="search.results" alt=$}

in skins//customer/addons/my_changes/hooks/buttons/custom.override.tpl use

{if whatever condition if you have if any}
{include file="buttons/go.tpl" but_name="search.results" alt=$}
alt="{$alt}" title="{$alt}" class="go-button" />


Thank you. I tried but doesn’t work. It doesn’t show any error either.

I’ll try expand the hook to include more declarations, maybe it is because is right in the middle of a if/else

Best regards,

You did clear the cache after adding the hook didn’t you?

Add a {debug} into the top of the hook file. If the debug window displays then you know you have the hook installed correctly. If not, then you don’t.