Jump to content

How can print the name of its controller in a tpl?


Recommended Posts

Try with $page_name. It's usually about guessing anyway. Download your presta folder, do a global search for the template name, or if you want to be more specific $this->setTemplate('templatename.tpl);

This should bring up the controller

Link to comment
Share on other sites

Well product-list.tpl is bit specific. Depending where it used, $products variable is passed from different controllers.

On homepage for example each tab calls modules controller as $products are passed in their tpl  (blocknew, bestsellers, homefeatured.

On other pages apropriate controller is used, for category page CategoryController, for new products NewProductsController and so on.

They are in controllers/front.

 

But what are you trying to do exactly ? 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...