Main Page | Directories | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Class Members | File Members | Related Pages | Examples

example_typolinkpop.php File Reference

Go to the source code of this file.

Functions

 user_typoLinkPopUp ($content, $conf)
 Demonstrates how to make typolink tags (<link ...>) open in a pop-up window.


Function Documentation

user_typoLinkPopUp content,
conf
 

Demonstrates how to make typolink tags (<link ...>) open in a pop-up window.

Example can be found in the testsite package at the page-path "/Intro/TypoScript examples/Small Tricks/Making Pop-up links/" This TypoScript configuration will also demonstrate it:

tt_content.text.20.parseFunc.tags.link.typolink.userFunc = user_typoLinkPopUp includeLibs.popup = media/scripts/example_typolinkpop.php config.setJS_openPic = 1

page = PAGE page.typeNum = 0 page.10 < styles.content.get

(Plus the "content (default)" static template included as well)

Parameters:
array In this case: An array with data you can use for processing; keys "url" and "aTagParams" contains something at least
array TypoScript array with custom properties for this function call.
Returns:
string Return the new tag
See also:
tslib_cObj::typoLink()

Definition at line 71 of file example_typolinkpop.php.

00071                                              {
00072    $aOnClick = 'openPic(\''.$GLOBALS['TSFE']->baseUrlWrap($content['url']).'\',\'popupwin\',\'width=400,height=500,status=0,menubar=0\'); return false;';
00073    $TAG =   '<a href="#" onclick="'.htmlspecialchars($aOnClick).'"'.$content['aTagParams'].'>';
00074    return $TAG;
00075 }


Generated on Sun Oct 3 01:06:17 2004 for TYPO3core 3.7.0 dev by  doxygen 1.3.8-20040913