How to get Current Controller name in prestashop?

user1939067 picture user1939067 · Dec 31, 2012 · Viewed 21.7k times · Source

How do I get the Current Controller name in prestashop 1.5?

Answer

Makarand Mane picture Makarand Mane · Nov 8, 2013

In your smarty template file (.tpl) use this code to get controller name.

{* Example URL Example.com/index.php?id_category=4&controller=category}

{assign var='controllerName' value=$smarty.get.controller}

{$controllerName}

OR

{$smarty.get.controller}

Smarty have reserved variables

See detailed documentation here.