Jump to content

[Solved] How can I set target blank for top banner?


NixxxoN

Recommended Posts

Hello everyone! This is my first message here.

I'm new to prestashop editing in hard code and I have some trouble in editing some stuff in hard code, I'm a bit lost as to what files I have to edit. Prestashop has an enormous amount of files and you can get a bit lost sometimes.

The question is, how can I set target="_blank" to the top banner?

I tried to edit the blockbanner.tpl and nothing happened. I tried to turn off HTML purifier (suggestion I found in this forum I think) and nothing...

I'm using the default bootstrap theme, but with one of the colour templates, I think its the number 5 with the maroon/cream colours.

Edited by NixxxoN (see edit history)
Link to comment
Share on other sites

Hi,

you have to modify in the file : /modules/blockbanner/blockbanner.tpl (if the file doesn't exists in the folder: /themes/default-bootstrap/modules/blockbanner/blockbanner.tpl)

change the first line 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 target="_blank" 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'}">

(add the red highllighted code to the <a > tag)

If the change is not visible, then you have to clear cache from BackOffice:  Advanced Parameters -> Performance.

On this page pay attention to the option: Template compilation , it should be set to "Recompile templates if the files have been updated".

 

Regards, Leo

Link to comment
Share on other sites

hi,

would you mind mark the topic a solved?

If you don't know how to do it, here is the explanation:

To mark a topic as [solved] :
- Edit the first post of your topic by clicking on the "Edit" button,
- Click on the "Use full editor" button,
- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.

Regards, Leo

Link to comment
Share on other sites

hi,

would you mind mark the topic a solved?

If you don't know how to do it, here is the explanation:

To mark a topic as [solved] :

- Edit the first post of your topic by clicking on the "Edit" button,

- Click on the "Use full editor" button,

- Add the "[solved]" string at the beginning of your topic title and click on the "Submit Modified Post" button.

Regards, Leo

 

 

Ok, I didnt know I had to do so.

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...