st4rl3t Posted August 16, 2008 Share Posted August 16, 2008 Hi!Anyone knows how to display image in .tpl file? I have tried to put code: but it does not show up on the page.Please help.Thank you. Link to comment Share on other sites More sharing options...
spott Posted August 16, 2008 Share Posted August 16, 2008 I think right way is: Also check, that your image patch is right.I don't understand - I want to end this image tag with / >, but forum changes it to > Link to comment Share on other sites More sharing options...
jolvil Posted August 16, 2008 Share Posted August 16, 2008 for me it works fine with it depends where you put your image Link to comment Share on other sites More sharing options...
ejectcore Posted August 16, 2008 Share Posted August 16, 2008 If you image is in the theme directory use prestasho smarty theme image variable (please ensure you upload your image to themes/youtheme/img) you will find all the variables for different directories for you store located in the init.php line 95example $smarty->assign(array( 'base_dir' => __PS_BASE_URI__, 'base_dir_ssl' => (Configuration::get('PS_SSL_ENABLED') ? 'https://' : 'http://').htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').__PS_BASE_URI__, /* If the current page need SSL encryption and the shop allow it, then active it */ 'protocol' => $protocol, 'img_ps_dir' => _PS_IMG_, 'img_cat_dir' => _THEME_CAT_DIR_, 'img_lang_dir' => _THEME_LANG_DIR_, 'img_prod_dir' => _THEME_PROD_DIR_, 'img_manu_dir' => _THEME_MANU_DIR_, 'img_sup_dir' => _THEME_SUP_DIR_, 'img_ship_dir' => _THEME_SHIP_DIR_, 'img_col_dir' => _THEME_COL_DIR_, 'img_dir' => _THEME_IMG_DIR_, 'css_dir' => _THEME_CSS_DIR_, 'js_dir' => _THEME_JS_DIR_, 'tpl_dir' => _PS_THEME_DIR_, 'mail_dir' => _MAIL_DIR_, 'lang_iso' => $ps_language->iso_code, 'come_from' => 'http://'.htmlspecialchars($_SERVER['HTTP_HOST'], ENT_COMPAT, 'UTF-8').htmlentities($_SERVER['REQUEST_URI']), 'shop_name' => Configuration::get('PS_SHOP_NAME'), 'cart_qties' => intval($cart->nbProducts()), 'cart' => $cart, 'currencies' => Currency::getCurrencies(), 'id_currency_cookie' => intval($currency->id), 'currency' => $currency, 'languages' => Language::getLanguages(), 'logged' => $cookie->isLogged(), 'page_name' => $page_name, 'customerName' => ($cookie->logged ? $cookie->customer_firstname.' '.$cookie->customer_lastname : false) )); Link to comment Share on other sites More sharing options...
st4rl3t Posted August 17, 2008 Author Share Posted August 17, 2008 Thank you for ur help! Link to comment Share on other sites More sharing options...
ken Posted September 14, 2008 Share Posted September 14, 2008 HiI have successfully added new pages and images to new tpl files but I’ve hardcoded the image links. :red: I now wish to change the image links to smarty variables but I can’t get the correct syntaxI tried which gives and which gives Fatal error: Smarty error: [in /home/www/my_site.co.uk/themes/my_theme/restore.tpl line 6]: syntax error: invalid attribute name: '>' (Smarty_Compiler.class.php, line 1547) in /home/www/my_site.co.uk/tools/smarty/Smarty.class.php on line 1097 and which gives What is the correct syntax to use smarty variables in tpl files?RegardsKen. Link to comment Share on other sites More sharing options...
ken Posted September 14, 2008 Share Posted September 14, 2008 My Bad!!!I had my links inside the curly brackets. They need to be outside :-) This works '} {' RegardsKen. Link to comment Share on other sites More sharing options...
Rod_ Posted September 17, 2008 Share Posted September 17, 2008 By the way guys... What do you use to edit the tpl files?. I heard something about one but now I can't find the thread where it is again xP . Link to comment Share on other sites More sharing options...
Paul C Posted September 17, 2008 Share Posted September 17, 2008 I use DreamWeaver, or the crimson (free editor).Paul Link to comment Share on other sites More sharing options...
ruilong Posted September 17, 2008 Share Posted September 17, 2008 I use php designer 2007 Link to comment Share on other sites More sharing options...
Rod_ Posted September 17, 2008 Share Posted September 17, 2008 But what about the highlighted text or tags recognition?. Link to comment Share on other sites More sharing options...
zenrider420 Posted October 5, 2008 Share Posted October 5, 2008 I use the open source PSPad Editor for everything... It just rocks... Link to comment Share on other sites More sharing options...
lordanthony Posted October 5, 2008 Share Posted October 5, 2008 Another vote for PSPad. It's a marvellous editor. Link to comment Share on other sites More sharing options...
BoKr Posted November 5, 2012 Share Posted November 5, 2012 Do you got by chance a syntax ini for TPL files in PSpad? thanks alot Link to comment Share on other sites More sharing options...
Recommended Posts