Wondering if there is any easy way to add to all homepage href links: target=_top
Want to do this to "break out of frame" for when other websites display my site in an iFrame. I've tried some JavaScript tricks to break out of there frame but they didn't wont.
Are you wanting to allow sites to embed your website in iframes? If not you should review your Content Security Policy and also take a look at X-Frame-Options, which you can pass in your header.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
I want them to be able to put my site in an iframe i just want as soon as someone click on any links in the iframe that the links open in a target=_top aka a new tab.
Just need to know what file I need to edit in OC3 to make all homepage href/links have this in them target=_top
Just need to know what file I need to edit in OC3 to make all homepage href/links have this in them target=_top
~ OC 3.0.3.2 and OCmods only ~
a href tags are not generated dynamic in default OC, there is no single file. You would most likely have to edit your twig files, common/header, common/menu, etc... and append target.
Might be possible to do something in bulk by creating an event and use PHP DOM manipulation. Downside is it could increase load on the server if you have a huge amount links being generated.
Might be possible to do something in bulk by creating an event and use PHP DOM manipulation. Downside is it could increase load on the server if you have a huge amount links being generated.
Full Stack Web Developer :: Send a PM for Custom Work.
Backup and learn how to recover before you make any changes!
Does this happen a lot?
UK OpenCart Hosting | OpenCart Audits | OpenCart Support - please email info@antropy.co.uk
Who is online
Users browsing this forum: mattltm and 327 guests