In the module I display a simple code with a picture, and I want to get the path to the template when I write this

<?php defined( '_JEXEC') or die('Restricted access'); $app = JFactory::getApplication(); $template_url = $this->baseurl . '/templates/' . $this->template; ?> <img src="<? echo $logo; ?>/images/blocks_services_im1.png"/> 

That gives the error message Fatal error: How to get this path? I ask for your help.

    1 answer 1

    Thanks to all for the help, I found the solution myself, it may be useful to someone.

     defined( '_JEXEC') or die('Restricted access'); $app = JFactory::getApplication(); $template = $app->getTemplate(); $template_url = JURI::root(true).'/templates/'.$template.'/'; <img src="<? echo $template_url; ?>/images/blocks_services_im1.png"/>