wstar Posted May 6, 2015 Share Posted May 6, 2015 I can't seem to find my issue. On my test.tpl page I only have {$tpl_dir} And it appear to be empty. However this block of code works just fine. {if $coffee == 'good'} Good {else} Bad {/if} Am i missing something to use these variables? $img_ps_dir //URL for the PrestaShop image folder.$img_cat_dir //URL for the categories images folder.$img_lang_dir //URL for the languages images folder.$img_prod_dir //URL for the products images folder.$img_manu_dir //URL for the manufacturers images folder.$img_sup_dir //URL for the suppliers images folder.$img_ship_dir //URL for the carriers (shipping) images folder.$img_dir //URL for the theme’s images folder.$css_dir //URL for the theme’s CSS folder.$js_dir //URL for the theme’s JavaScript folder.$tpl_dir //URL for the current theme’s folder.$modules_dir //URL the modules folder.$mail_dir //URL for the mail templates folder.$pic_dir //URL for the pictures upload folder Link to comment Share on other sites More sharing options...
PascalVG Posted May 8, 2015 Share Posted May 8, 2015 The $tpl_dir is defined in classes/controller/FrontController.php, so if your tpl is called through the front controller or any of it's extended classes (i.e. all controllers for the front end of your shop...) , it should be known. How do you get to your tpl file? pascal Link to comment Share on other sites More sharing options...
wstar Posted May 8, 2015 Author Share Posted May 8, 2015 (edited) Currently this is only a admin configure page. But I use return $this->display(__FILE__, 'settings.tpl'); To call the page in the "function getContent()". Is there anyway to get these using the administration area? Edited May 8, 2015 by wstar (see edit history) Link to comment Share on other sites More sharing options...
PascalVG Posted May 9, 2015 Share Posted May 9, 2015 Well in not called through a controller, you could always add the smarty variable yourself, just before the call to tpl file: $this->context->smarty->assign(array( 'tpl_dir' => _PS_THEME_DIR_, )); pascal Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now