Technology Tools for Ministry

Community

Web-Empowered Church User Community
All Categories > Getting Started > Templates > FCE Typolink target/pop up window troubles
Total Posts: 2 - Pages (1): [1]
Author: C. Stephens
Posted: Jun 12 2008 - 02:57 PM
Subject: FCE Typolink target/pop up window troubles
Goal: Trying to get a fce created that will allow a link to open in a new fixed size window. Got the link and linkfield defined.

Problem: While I can assign a fixed window size from the RTE for the link, it appears as a simple link with out the window.open properties. So i decided to try to define those properites in the typoscript of the FCE for the link. Here is what I have so far:


<field_link2 type="array">
<type>attr</type>
<tx_templavoila type="array">
<title>link 2</title>
<sample_data type="array">
<numIndex index="0"></numIndex>
</sample_data>
<eType>link</eType>
<eType_EXTRA type="array">
<objPath></objPath>
</eType_EXTRA>
<TypoScript>
10 = TEXT
10.typolink.parameter.field=field_link2
10.typolink.parameter.wrap = | " " 230x450:resizable=1,location=0
10.typolink.JSwindow_params=menubar=1,scrollbars=1,resizable=1,location=0,toolbar=0


</TypoScript>


This results in a link like this:


<a href="help/" target="FEopenLink" onclick="vHWin=window.open('http://twoguysfromvista.com/help/','FEopenLink','menubar=1,scrollbars=1,resizable=1,location=0,toolbar=0,width=230,height=450');vHWin.focus();return false;">How Can I Help</a>">text for link</a>


Note how it is wrapping the link with another link. If I can figure out how to prevent that wrapping then all will be good. Also in the window.open link, it show the page title (How Can I Help) instead of the text that was entered (text for link).

Any suggestions? Or another way to tackle this?
Author: Jeff Segars
Posted: Jun 13 2008 - 05:42 PM
Subject: re: FCE Typolink target/pop up window troubles
Cathy,
From your data structure, it looks like you're actually mapping onto an attribute of the <a /> tag, right? If so, I think you need to tell typolink to only return the URL and not the entire <a /> tag. I haven't actually tried this with a JS popup window, but I have used it successfully with normal links.

CODE:
10.typolink.returnLast = url


Hope that helps!
Jeff
Total Posts: 2 - Pages (1): [1]
You must login to post a message to this conference.