Discussion:
[Typo3] Forcing links to open in same window
Jason Lefkowitz
2005-06-27 21:47:30 UTC
Permalink
Hey everybody --

Here is a question that has been asked a million times, but I can't find an answer anywhere that works for me:

how do you force typo to stop opening links in new windows by default?

Most of the advice I've seen in the FAQs and on the list centers around setting the following constants:

PAGE_TARGET =
content.pageFrameObj =

This supposedly clears out the "page" default value that is set for both of these, which is what is causing the new windows.

But here's the thing -- I have gone through and added these constants to all my TS templates. I check in the Typoscript Object Browser and confirm that the values are empty (i.e. they're not inheriting "page" or something else from another template).

But the links still keep opening in new windows!! Agh!

This is driving me crazy. There must be a reliable way to turn this behavior off. Help!

- Jason Lefkowitz (jlefkowitz)

-----------------------
The mailing list archive is found here:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
Oliver Schröder
2005-06-28 05:28:38 UTC
Permalink
Hi,

I use (Typo3 3.7):

config.intTarget = _top
config.extTarget = _blank
PAGE_TARGET=

... and it works.

Oliver
Post by Jason Lefkowitz
Hey everybody --
how do you force typo to stop opening links in new windows by default?
PAGE_TARGET =
content.pageFrameObj =
This supposedly clears out the "page" default value that is set for both of these, which is what is causing the new windows.
But here's the thing -- I have gone through and added these constants to all my TS templates. I check in the Typoscript Object Browser and confirm that the values are empty (i.e. they're not inheriting "page" or something else from another template).
But the links still keep opening in new windows!! Agh!
This is driving me crazy. There must be a reliable way to turn this behavior off. Help!
- Jason Lefkowitz (jlefkowitz)
-----------------------
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
tapio
2005-06-28 06:19:10 UTC
Permalink
Post by Oliver Schröder
Hi,
config.intTarget = _top
config.extTarget = _blank
PAGE_TARGET=
... and it works.
DON'T use _top - it is very harmful, when you edit pages
by using the 'View' module - if you click links you loose the
backend interface! Use '_self' instead and you don't loose
your backend interface!

Tapio Markula.
Post by Oliver Schröder
Oliver
Post by Jason Lefkowitz
Hey everybody --
Here is a question that has been asked a million times, but I can't
how do you force typo to stop opening links in new windows by default?
Most of the advice I've seen in the FAQs and on the list centers
PAGE_TARGET = content.pageFrameObj =
This supposedly clears out the "page" default value that is set for
both of these, which is what is causing the new windows.
But here's the thing -- I have gone through and added these constants
to all my TS templates. I check in the Typoscript Object Browser and
confirm that the values are empty (i.e. they're not inheriting "page"
or something else from another template).
But the links still keep opening in new windows!! Agh!
This is driving me crazy. There must be a reliable way to turn this behavior off. Help!
- Jason Lefkowitz (jlefkowitz)
-----------------------
http://typo3.org/documentation/mailing-lists/english-main-list-archive/
Jason Lefkowitz
2005-06-28 14:28:04 UTC
Permalink
Hi Oliver,

I tried adding your setup to my TS template constants (with the value set to "_self" as suggested in the followup below), and it still didn't work :-(

HOWEVER... after some more digging through the Typoscript Object Browser, I found a value that looked suspicious. Namely, this:

styles.content.links.target = {$PAGE_TARGET}

Just to see what would happen, I tried changing this in the object browser from "{$PAGE_TARGET}" to "_self". Lo and behold, the links now all opened in the same window!

Now, one would think that if you have "PAGE_TARGET = _self" in the constants, this would result in styles.content.links.target getting set to _self as well. But apparently that is not the case, or at least not reliably so. So for now I'm going with overriding the $PAGE_TARGET there and just forcing the value to _self...

Ah, the mysteries of Typo3, how few ulcers I would have without them :-)

Thanks everybody!!


- Jason Lefkowitz (jlefkowitz)

-----------------------
This thread is located in the archive at this URL:
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110129136/
tapio
2005-06-28 14:47:34 UTC
Permalink
Post by Jason Lefkowitz
Hi Oliver,
I tried adding your setup to my TS template constants (with the value set to "_self" as suggested in the followup below), and it still didn't work :-(
styles.content.links.target = {$PAGE_TARGET}
Just to see what would happen, I tried changing this in the object browser from "{$PAGE_TARGET}" to "_self". Lo and behold, the links now all opened in the same window!
Now, one would think that if you have "PAGE_TARGET = _self" in the constants, this would result in styles.content.links.target getting set to _self as well. But apparently that is not the case, or at least not reliably so. So for now I'm going with overriding the $PAGE_TARGET there and just forcing the value to _self...
Ah, the mysteries of Typo3, how few ulcers I would have without them :-)
I have defined this value to contant.txt for CSS Styled Content
and that's it - I have not have ever any problems.

Tapio Markula.
Post by Jason Lefkowitz
Thanks everybody!!
- Jason Lefkowitz (jlefkowitz)
-----------------------
http://typo3.org/documentation/mailing-lists/english-main-list-archive/thread/110129136/
Continue reading on narkive:
Loading...