DEPRECATION WARNING
This documentation is not using the current rendering mechanism and is probably outdated. The extension maintainer should switch to the new system. Details on how to use the rendering mechanism can be found here.
EXT: KB Better stdWrap¶
Author: | Kasper Skårhøj |
---|---|
Created: | 2002-11-01T00:32:00 |
Changed: | 2005-02-17T15:06:52 |
Author: | Kraft Bernhard |
Email: | kraftb@gmx.net |
Info 3: | |
Info 4: |
EXT: KB Better stdWrap¶
Extension Key: kb_betterstdwrap
Copyright 2000-2002, Kraft Bernhard, <kraftb@gmx.net>
This document is published under the Open Content License
available from http://www.opencontent.org/opl.shtml
The content of this document is related to TYPO3
- a GNU/GPL CMS/Framework available from www.typo3.com
Table of Contents¶
EXT: KB Better stdWrap 1
Introduction 1
What does it do? 1
Users manual 1
Known problems 2
To-Do list 2
Changelog 2
Introduction¶
What does it do?¶
This extension extends the standard Wrap (stdWrap) feature of TEXT and other content objects in TS by a special possibility. With this extension you can use markers of the form {glob:...} to let the marker get replaced by content from the $GLOBALS array.
Users manual¶
The only new feature in stdWrap is the new {glob:...} pattern. With it you can insert data from the $GLOBALS array which contains (AFAIK) all variables actually defined in the PHP script. You can not just access plain variables but also objects and arrays and their object-variables or array-values. You can access object-variables by their names and array-values by their keys.
To generate a Text content object which contains the acutally logged in User you would have to create a code similar to the following:
temp.mytext = TEXT
temp.mytext.insertData = 1
temp.mytext.value = Actually logged in User: {glob:TSFE:fe_user:user:username}
You see you can insert an arbitrary value from $GLOBALS['TSFE'] by using {glob:TSFE:...}
For example you can also insert the Site-Title as defined in the Templates and the actual page title.
temp.mytitle = TEXT
temp.mytitle.insertData = 1
temp.mytitle.value = {glob:TSFE:tmpl:setup:sitetitle}: {glob:TSFE:page:title}
If you are looking for a value but you don't exactly know how it is called and where you find it you can output the content of some array in one of your extensions with:
print_r ($GLOBALS['TSFE')
Which prints TSFE for example. But be aware that this is a rather large list. You should avoid to do print_r($GLOBALS) as this will result in many KB of HTML data generated and you won't be able to find something in the generated output.
TIP: Use View source feature of your browser to view the output of print_r properly.
Known problems¶
None at the moment
To-Do list¶
Pherhaps add some more fancy stuff. Like add the possibility to call functions and use their return values.