Guest greylin Posted August 31, 2011 Share Posted August 31, 2011 I have created my store inside an i-frame on Wordpress. I knew it would be risky but decided to try anyway. It's all working really well apart from one final problem that I am stuck on because I don't know enough about PHP and I hope somebody here might be able to figure it out. In cartNavi.inc.php lines 83-85 read: $links[] = array ( 'link' => "index.php", 'text' => $lang['front']['boxes']['homepage']); I want to change the middle line to something like 'link' => "http://mysite.com", which is easy enough to do BUT I also need it to open in the top window - ie, bust out of its i-frame. If it was an HTML link I could add target="_top" but how can I achieve something similar with 'link' => "index.php",? I have added a frame buster script to the linked page but it hasn't helped with this particular homepage link. If anyone can let me know of a fix for this I would be so grateful! Everything else is working so well it would be a crying shame to drop the i-frame because of this one final niggle. CubeCart Version: 3.0.20 PHP Version: 5.2.14 Quote Link to comment Share on other sites More sharing options...
bsmither Posted August 31, 2011 Share Posted August 31, 2011 PHP allows dissimilar quotes to co-exist within each other. That is, a text string enclosed with "quotes" can have 'apostrophes' with in it. A text string enclosed in 'apostrophes' can have "quotes" within it. If you find yourself needing to use similar quotes, then escaping them with backslashes is required. 'link' => "http://mysite.com\" target=\"_top", The first escaped quote will be seen as a character to be used literally and will serve as the closing quote of the URL. The second escaped quote is to be used literally and will serve as the opening quote to the target value. Cubecart will add the other necessary quote marks when it generates the HTML. Quote Link to comment Share on other sites More sharing options...
Guest greylin Posted August 31, 2011 Share Posted August 31, 2011 Thank you for that very clear explanation and solution, which took all of 30 seconds to implement. Not only does it work (yay!) but there's another little nugget of PHP knowledge I can tuck away for future use. Your help is very much appreciated - thanks again. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.