Interspire Product Knowledge Base

Would you like to...

Print this page Print this page

Email this page Email this page

Post a comment Post a comment

Subscribe me

Add to favorites Add to favorites

Remove Highlighting Remove Highlighting

Edit this Article

Export to PDF

User Opinions (6 votes)

83% thumbs up 16% thumbs down

How would you rate this answer?



Thank you for rating this answer.

How can I stop every link opening in a new window?

This applies to versions of Interspire Website Publisher NX below 1.7

There is a section of code that adds the new window code into every link submitted from the backend. Open up /admin/includes/classes/class.helper.php and find this code:


function FixContentLinks($Data)
{
    // Make sure links all open in a new window. Only do this if
    // DevEdit isn't installed
    if(!is_dir("de"))
    {
        $pattern = "<a([^</a>])";
        $replace = "<a target='_blank'\\1";
        return eregi_replace($pattern, $replace, $Data);
    }
    else
    {
        return $Data;
    }
}


Then just change it to:

function FixContentLinks($Data)
{
        return $Data;
}


That will prevent any further target="_blank" attributes from being added. But you may still have to alter the ones you have already.

If you have any problems with this guide, send in a support ticket via your client area.

Related Articles

No related articles were found.

Attachments

No attachments were found.

Powered by Interspire Knowledge Manager - World's #1 Best Selling FAQ and Knowledge Base Software