Nandos Posted June 14, 2016 Share Posted June 14, 2016 (edited) Hi guys, someone can help me with a little thing? This is a marginal modification i want to make on my site, but if it works, would be a nice addition. Basically, i want to modify the block banner module in order to open the link associated to the banner image in a new tab instead of the current one. I thought to add somewhere, like in blockbanner.tpl, a sort of ..target="blank"... but to be honest i don't know where... Thanks in advance! Edited June 17, 2016 by Nandos (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted June 14, 2016 Share Posted June 14, 2016 Assuming you're using the default PrestaShop v1.6.1.5 theme, copy modules/blockbanner/blockbanner.tpl to themes/default-bootstrap/modules/blockbanner/blockbanner.tpl, then you can change line 25 from: <a href="{if $banner_link}{$banner_link|escape:'htmlall':'UTF-8'}{else}{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}{/if}" title="{$banner_desc|escape:'htmlall':'UTF-8'}"> to: <a href="{if $banner_link}{$banner_link|escape:'htmlall':'UTF-8'}{else}{if isset($force_ssl) && $force_ssl}{$base_dir_ssl}{else}{$base_dir}{/if}{/if}" title="{$banner_desc|escape:'htmlall':'UTF-8'}" target="_blank"> 1 Link to comment Share on other sites More sharing options...
Nandos Posted June 15, 2016 Author Share Posted June 15, 2016 Perfect, it works correctly, thank you In the folder .../themes/default-bootstrap/modules/ there wasn't the blockbanner folder, i made that and looks like it's working with no issues so far. Thanks again! Link to comment Share on other sites More sharing options...
Vlcventy Posted November 1, 2016 Share Posted November 1, 2016 (edited) Hi, I change, but url open in new tab, not open in new window... And, what should be the shape of the link when you configure the module to charge an external page in a new window?!? BR Venty Edited November 1, 2016 by Vlcventy (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted November 1, 2016 Share Posted November 1, 2016 It's normal for the page to open in a new tab. It's up to the user to configure their browser to open links in a new window. You'd have to write JavaScript to override the browser preference to open in a new window. Link to comment Share on other sites More sharing options...
Vlcventy Posted November 1, 2016 Share Posted November 1, 2016 Thank you so much... Pls, I am looking for and answer to the second question - What should be the format of the link when I configure the module to open an external page... ??? I write http://www.mypage.com , but returned me error 404 no such page... 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