How To Find Out/ Detect The Page You Are On

Hello,

I want to show a button on homepage, on category page will be a different button and on detail page will be also different one.

Can anyone help me how to find out on which page I am in order to show the right button

eg.

If page = home {show button A}

If page = categories {show button B}

If page = detail page {show button C}

Should I add the code for these in ../ templates / common / product_data.tpl

Hello gurdji

{if $smarty.request.dispatch == "index.index"}

{/if}

{if $smarty.request.dispatch == "categories.view"}

{/if}

{if $smarty.request.dispatch == "products.view"}

{/if}

Best regards

Robert