matteo_mont Posted December 11, 2012 Share Posted December 11, 2012 (edited) 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 December 12, 2012 by matteo_mont (see edit history) Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted December 11, 2012 Share Posted December 11, 2012 I'm newbie in developing but i think the trick is into the href comand below You are correct. Just replace the href (both) with the page you want to link to. Marty Shue 1 Link to comment Share on other sites More sharing options...
matteo_mont Posted December 12, 2012 Author Share Posted December 12, 2012 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 More sharing options...
Carolina Custom Designs Posted December 12, 2012 Share Posted December 12, 2012 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 1 Link to comment Share on other sites More sharing options...
matteo_mont Posted December 12, 2012 Author Share Posted December 12, 2012 Hi Marty, you are great! so just I have to paste the code you provided, or do I need to edit something into the target attribute instead of _blank? Sorry I didn't get what you mean for "All you need is the target attribute." Thanks again :-) Matteo Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted December 12, 2012 Share Posted December 12, 2012 so just I have to paste the code you provided, or do I need to edit something into the target attribute instead of _blank? Yes, just paste the code provided above. No need to edit anything. "_blank" just tells the link to open in a blank window. Marty Shue 1 Link to comment Share on other sites More sharing options...
matteo_mont Posted December 12, 2012 Author Share Posted December 12, 2012 Cheers Marty! I'll let you know the outcome, as soon as I change the code. Matteo Link to comment Share on other sites More sharing options...
matteo_mont Posted December 12, 2012 Author Share Posted December 12, 2012 Hi Marty, just to confirm I pasted the code provided by you and it's working 100% thanks, thanks and thanks again! Matteo P.S. I think I have to update this post as solved... is there any button? Link to comment Share on other sites More sharing options...
Carolina Custom Designs Posted December 12, 2012 Share Posted December 12, 2012 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 1 Link to comment Share on other sites More sharing options...
Recommended Posts