Jump to content

[SOLVED] External link in modules - permanent links block


Recommended Posts

Hi there,

 

I'd like to edit an external link into the permanent link module.

 

the block is in the Top of Pages section, I'm using prestashop 1.4.9

 

I edited some code into the tpl files, but when I click the link it send me to an internal page where i get the 403 error (obviously... because that page doesn't exist)

 

My plan is if I click on this link a new page to the extarnal website must be opened.

 

I'm newbie in developing but i think the trick is into the href comand below

 

 

<!-- Facebook -->

<div class="facebook">

<a href="{$link->getPageLink('contact-form.php', true)}"><img src="{$img_dir}icon/facebook.gif" alt="{l s='facebook' mod='blockpermanentlinks'}" title="{l s='facebook' mod='blockpermanentlinks'}" /></a> 

<a href="{$link->getPageLink('contact-form.php', true)}">{l s='facebook' mod='blockpermanentlinks'}</a>

 

 

any help is high apreciated

 

thanks for sharing

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

thanks a lot Marty :-)

 

I followed what you said and it works!

 

I just changed the previous code in:

 

<!-- Facebook -->

<div class="facebook">

<a href="http://www.facebook.com/">'>http://www.facebook.com/"><img src="{$img_dir}icon/facebook.gif" alt="{l s='facebook' mod='blockpermanentlinks'}" title="{l s='facebook' mod='blockpermanentlinks'}" /></a> 

<a href="http://www.facebook.com/">{l s='facebook' mod='blockpermanentlinks'}</a>

 

 

Actually i have one more question...

I'd like the linked external page will be opened in a new window.

I think it's related to the onclick command, but I have no idea about I could do that.

Can you help me? any tutorial or whatever else to address my purpose?

thanks for sharing

Link to comment
Share on other sites

thanks a lot Marty :-)

 

I followed what you said and it works!

 

Great. Glad you got it to work.

 

I'd like the linked external page will be opened in a new window.

 

Here would be your code

<div class="facebook">
<a href="http://www.facebook.com/" target="_blank"><img src="{$img_dir}icon/facebook.gif" alt="{l s='facebook' mod='blockpermanentlinks'}" title="{l s='facebook' mod='blockpermanentlinks'}" /></a> 
<a href="http://www.facebook.com/" target="_blank">{l s='facebook' mod='blockpermanentlinks'}</a>

 

All you need is the target attribute.

 

Hope that helps!

 

Marty Shue

  • Like 1
Link to comment
Share on other sites

Hi Marty,

 

just to confirm I pasted the code provided by you and it's working 100%

 

thanks, thanks and thanks again!

 

You are welcome. Glad to hear you got it working.

 

P.S. I think I have to update this post as solved... is there any button?

 

Just edit your original post and select 'use full editor' (going by memory here) and that should allow you to also edit the post topic.

 

Marty Shue

  • Like 1
Link to comment
Share on other sites

×
×
  • Create New...