template Class Reference

Inheritance diagram for template:

Inheritance graph
[legend]
List of all members.

Public Member Functions

 template ()
 wrapClickMenuOnIcon ($str, $table, $uid='', $listFr=1, $addParams='', $enDisItems='', $returnOnClick=FALSE)
 viewPageIcon ($id, $backPath, $addParams='hspace="3"')
 issueCommand ($params, $rUrl='')
 isCMlayers ()
 thisBlur ()
 helpStyle ()
 getHeader ($table, $row, $path, $noViewPageIcon=0, $tWrap=array('',''))
 getFileheader ($title, $path, $iconfile)
 makeShortcutIcon ($gvList, $setList, $modName, $motherModName="")
 makeShortcutUrl ($gvList, $setList)
 formWidth ($size=48, $textarea=0, $styleOverride='')
 formWidthText ($size=48, $styleOverride='', $wrap='')
 redirectUrls ($thisLocation='')
 formatTime ($tstamp, $type)
 parseTime ()
 startPage ($title)
 endPage ()
 header ($text)
 section ($label, $text, $nostrtoupper=FALSE, $sH=FALSE, $type=0, $allowHTMLinHeader=FALSE)
 divider ($dist)
 spacer ($dist)
 sectionHeader ($label, $sH=FALSE, $addAttrib='')
 sectionBegin ()
 sectionEnd ()
 middle ()
 endPageJS ()
 docBodyTagBegin ()
 docStyle ()
 addStyleSheet ($key, $href, $title='', $relation='stylesheet')
 insertStylesAndJS ($content)
 initCharset ()
 generator ()
 icons ($type, $styleAttribValue='')
 t3Button ($onClick, $label)
 dfw ($string)
 rfw ($string)
 wrapInCData ($string)
 wrapScriptTags ($string, $linebreak=TRUE)
 table ($arr, $layout='')
 menuTable ($arr1, $arr2=array(), $arr3=array())
 funcMenu ($content, $menu)
 clearCacheMenu ($id, $addSaveOptions=0)
 loadJavascriptLib ($lib)
 getContextMenuCode ()
 getDragDropCode ($table)
 getTabMenu ($mainParams, $elementName, $currentValue, $menuItems, $script='', $addparams='')
 getTabMenuRaw ($menuItems)
 getDynTabMenu ($menuItems, $identString, $toggle=0, $foldout=FALSE, $newRowCharLimit=50, $noWrap=1, $fullWidth=FALSE, $defaultTabIndex=1, $dividers2tabs=2)
 getDynTabMenuId ($identString)
 getDynTabMenuJScode ()
 getVersionSelector ($id, $noAction=FALSE)
 getHtmlTemplate ($filename)
 setModuleTemplate ($filename)
 moduleBody ($pageRecord=array(), $buttons=array(), $markerArray=array(), $subpartArray=array())

Public Attributes

 $backPath = ''
 $form = ''
 $JScodeLibArray = array()
 $JScode = ''
 $JScodeArray = array()
 $postCode = ''
 $docType = ''
 $moduleTemplate = ''
 $scriptID = ''
 $bodyTagId = ''
 $bodyTagAdditions = ''
 $inDocStyles = ''
 $inDocStylesArray = array()
 $form_rowsToStylewidth = 9.58
 $form_largeComp = 1.33
 $endJS = 1
 $bgColor = '#F7F3EF'
 $bgColor2 = '#9BA1A8'
 $bgColor3 = '#F6F2E6'
 $bgColor4 = '#D9D5C9'
 $bgColor5 = '#ABBBB4'
 $bgColor6 = '#E7DBA8'
 $hoverColor = '#254D7B'
 $styleSheetFile = 'stylesheet.css'
 $styleSheetFile2 = ''
 $styleSheetFile_post = ''
 $backGroundImage = ''
 $inDocStyles_TBEstyle = ''
 $parseTimeFlag = 0
 $charset = 'iso-8859-1'
 $sectionFlag = 0
 $divClass = ''
 $tableLayout
 $table_TR = '<tr>'
 $table_TABLE = '<table border="0" cellspacing="0" cellpadding="0" id="typo3-tmpltable">'

Protected Member Functions

 getDocHeaderButtons ($buttons)
 getPagePath ($pageRecord)
 getPageInfo ($pageRecord)

Protected Attributes

 $additionalStyleSheets = array()

Detailed Description

Definition at line 169 of file template.php.


Member Function Documentation

template::addStyleSheet ( key,
href,
title = '',
relation = 'stylesheet' 
)

Insert additional style sheet link

Parameters:
string $key: some key identifying the style sheet
string $href: uri to the style sheet file
string $title: value for the title attribute of the link element
Returns:
string $relation: value for the rel attribute of the link element

void

Definition at line 965 of file template.php.

References $key.

template::clearCacheMenu ( id,
addSaveOptions = 0 
)

Creates a selector box with clear-cache items. Rather specialized functions - at least don't use it with $addSaveOptions unless you know what you do...

Parameters:
integer The page uid of the "current page" - the one that will be cleared as "clear cache for this page".
boolean If $addSaveOptions is set, then also the array of save-options for TCE_FORMS will appear.
Returns:
string <select> tag with content - a selector box for clearing the cache

Definition at line 1252 of file template.php.

References t3lib_div::getIndpEnv().

template::dfw ( string  ) 

dimmed-fontwrap. Returns the string wrapped in a -tag defining the color to be gray/dimmed

Parameters:
string Input string
Returns:
string Output string

Definition at line 1083 of file template.php.

template::divider ( dist  ) 

Inserts a divider image Ends a section (if open) before inserting the image

Parameters:
integer The margin-top/-bottom of the
ruler.
Returns:
string HTML content

Definition at line 791 of file template.php.

References sectionEnd().

template::docBodyTagBegin (  ) 

Creates the bodyTag. You can add to the bodyTag by $this->bodyTagAdditions

Returns:
string HTML body tag

Definition at line 910 of file template.php.

Referenced by startPage().

template::docStyle (  ) 

Outputting document style

Returns:
string HTML style section/link tags

Definition at line 920 of file template.php.

template::endPage (  ) 

Returns page end; This includes finishing form, div, body and html tags.

Returns:
string The HTML end of a page
See also:
startPage()

Definition at line 712 of file template.php.

References t3lib_div::devLog(), endPageJS(), t3lib_BEfunc::getUpdateSignalCode(), parseTime(), section(), sectionEnd(), and wrapScriptTags().

template::endPageJS (  ) 

If a form-tag is defined in ->form then and end-tag for that <form> element is outputted Further a JavaScript section is outputted which will update the top.busy session-expiry object (unless $this->endJS is set to false)

Returns:
string HTML content (<script> tag section)

Definition at line 893 of file template.php.

Referenced by endPage().

template::formatTime ( tstamp,
type 
)

Returns a formatted string of $tstamp Uses $GLOBALS['TYPO3_CONF_VARS']['SYS']['hhmm'] and $GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'] to format date and time

Parameters:
integer UNIX timestamp, seconds since 1970
integer How much data to show: $type = 1: hhmm, $type = 10: ddmmmyy
Returns:
string Formatted timestamp

Definition at line 565 of file template.php.

References $GLOBALS.

template::formWidth ( size = 48,
textarea = 0,
styleOverride = '' 
)

Returns <input> attributes to set the width of an text-type input field. For client browsers with no CSS support the cols/size attribute is returned. For CSS compliant browsers (recommended) a ' style="width: ...px;"' is returned.

Parameters:
integer A relative number which multiplied with approx. 10 will lead to the width in pixels
boolean A flag you can set for textareas - DEPRECATED, use ->formWidthText() for textareas!!!
string A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
Returns:
string Tag attributes for an <input> tag (regarding width)
See also:
formWidthText()

Definition at line 499 of file template.php.

References $GLOBALS.

Referenced by formWidthText().

template::formWidthText ( size = 48,
styleOverride = '',
wrap = '' 
)

This function is dedicated to textareas, which has the wrapping on/off option to observe. EXAMPLE: <textarea rows="10" wrap="off" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","off").'> or <textarea rows="10" wrap="virtual" '.$GLOBALS["TBE_TEMPLATE"]->formWidthText(48,"","virtual").'>

Parameters:
integer A relative number which multiplied with approx. 10 will lead to the width in pixels
string A string which will be returned as attribute-value for style="" instead of the calculated width (if CSS is enabled)
string Pass on the wrap-attribute value you use in your <textarea>! This will be used to make sure that some browsers will detect wrapping alright.
Returns:
string Tag attributes for an <input> tag (regarding width)
See also:
formWidth()

Definition at line 524 of file template.php.

References $GLOBALS, and formWidth().

template::funcMenu ( content,
menu 
)

Returns a one-row/two-celled table with $content and $menu side by side. The table is a 100% width table and each cell is aligned left / right

Parameters:
string Content cell content (left)
string Menu cell content (right)
Returns:
string HTML output

Definition at line 1234 of file template.php.

template::generator (  ) 

Returns generator meta tag

Returns:
string <meta> tag with name "generator"

Definition at line 1010 of file template.php.

Referenced by startPage().

template::getContextMenuCode (  ) 

Includes the necessary Javascript function for the clickmenu (context sensitive menus) in the document

Returns:
array Deprecated: Includes the code already in the doc, so the return array is always empty. Please just call this function without expecting a return value for future calls

Definition at line 1305 of file template.php.

template::getDocHeaderButtons ( buttons  )  [protected]

Fill the button lists with the defined HTML

Parameters:
array HTML for all buttons
Returns:
array Containing HTML for both buttonlists

Definition at line 1923 of file template.php.

References $key, t3lib_parsehtml::getSubpart(), t3lib_parsehtml::substituteMarker(), t3lib_parsehtml::substituteMarkerArray(), and t3lib_parsehtml::substituteSubpart().

template::getDragDropCode ( table  ) 

Includes the necessary javascript file (tree.js) for use on pages which have the drag and drop functionality (usually pages and folder display trees)

Parameters:
string indicator of which table the drag and drop function should work on (pages or folders)
Returns:
array If values are present: [0] = A <script> section for the HTML page header, [1] = onmousemove/onload handler for HTML tag or alike, [2] = One empty
layer for the follow-mouse drag element

Definition at line 1324 of file template.php.

template::getDynTabMenu ( menuItems,
identString,
toggle = 0,
foldout = FALSE,
newRowCharLimit = 50,
noWrap = 1,
fullWidth = FALSE,
defaultTabIndex = 1,
dividers2tabs = 2 
)

Creates a DYNAMIC tab-menu where the tabs are switched between with DHTML. Should work in MSIE, Mozilla, Opera and Konqueror. On Konqueror I did find a serious problem: <textarea> fields loose their content when you switch tabs!

Parameters:
array Numeric array where each entry is an array in itself with associative keys: "label" contains the label for the TAB, "content" contains the HTML content that goes into the div-layer of the tabs content. "description" contains description text to be shown in the layer. "linkTitle" is short text for the title attribute of the tab-menu link (mouse-over text of tab). "stateIcon" indicates a standard status icon (see ->icon(), values: -1, 1, 2, 3). "icon" is an image tag placed before the text.
string Identification string. This should be unique for every instance of a dynamic menu!
integer If "1", then enabling one tab does not hide the others - they simply toggles each sheet on/off. This makes most sense together with the $foldout option. If "-1" then it acts normally where only one tab can be active at a time BUT you can click a tab and it will close so you have no active tabs.
boolean If set, the tabs are rendered as headers instead over each sheet. Effectively this means there is no tab menu, but rather a foldout/foldin menu. Make sure to set $toggle as well for this option.
integer Character limit for a new row.
boolean If set, tab table cells are not allowed to wrap their content
boolean If set, the tabs will span the full width of their position
integer Default tab to open (for toggle <=0). Value corresponds to integer-array index + 1 (index zero is "1", index "1" is 2 etc.). A value of zero (or something non-existing) will result in no default tab open.
integer If set to '1' empty tabs will be remove, If set to '2' empty tabs will be disabled
Returns:
string JavaScript section for the HTML header.

Definition at line 1456 of file template.php.

References $content, and nbsp.

template::getDynTabMenuId ( identString  ) 

Creates the id for dynTabMenus.

Parameters:
string $identString: Identification string. This should be unique for every instance of a dynamic menu!
Returns:
string The id with a short MD5 of $identString and prefixed "DTM-", like "DTM-2e8791854a"

Definition at line 1589 of file template.php.

template::getDynTabMenuJScode (  ) 

Returns dynamic tab menu header JS code.

Returns:
string JavaScript section for the HTML header.

Definition at line 1599 of file template.php.

template::getFileheader ( title,
path,
iconfile 
)

Like ->getHeader() but for files in the File>* main module/submodules Returns the file-icon with the path of the file set in the alt/title attribute. Shows the file-name after the icon.

Parameters:
string Title string, expected to be the filepath
string Alt text
string The icon file (relative to TYPO3 dir)
Returns:
string HTML content

Definition at line 426 of file template.php.

References t3lib_div::fixed_lgd_cs(), and t3lib_div::split_fileref().

template::getHeader ( table,
row,
path,
noViewPageIcon = 0,
tWrap = array('','') 
)

Makes the header (icon+title) for a page (or other record). Used in most modules under Web>* $table and $row must be a tablename/record from that table $path will be shown as alt-text for the icon. The title will be truncated to 45 chars.

Parameters:
string Table name
array Record row
string Alt text
boolean Set $noViewPageIcon true if you don't want a magnifier-icon for viewing the page in the frontend
array $tWrap is an array with indexes 0 and 1 each representing HTML-tags (start/end) which will wrap the title
Returns:
string HTML content

Definition at line 400 of file template.php.

References $GLOBALS, $row, $TCA, t3lib_div::fixed_lgd_cs(), t3lib_iconWorks::getIconImage(), and viewPageIcon().

template::getHtmlTemplate ( filename  ) 

Function to load a HTML template file with markers.

Parameters:
string tmpl name, usually in the typo3/template/ directory
Returns:
string HTML of template

Definition at line 1853 of file template.php.

References $GLOBALS, t3lib_div::getURL(), and t3lib_div::resolveBackPath().

template::getPageInfo ( pageRecord  )  [protected]

Setting page icon with clickmenu + uid for docheader

Parameters:
array Current page
Returns:
string Page info

Definition at line 1976 of file template.php.

References $GLOBALS, t3lib_iconWorks::getIconImage(), t3lib_BEfunc::getRecordIconAltText(), and t3lib_iconWorks::skinImg().

template::getPagePath ( pageRecord  )  [protected]

Generate the page path for docheader

Parameters:
array Current page
Returns:
string Page path

Definition at line 1957 of file template.php.

References $GLOBALS, and t3lib_div::fixed_lgd_cs().

template::getTabMenu ( mainParams,
elementName,
currentValue,
menuItems,
script = '',
addparams = '' 
)

Creates a tab menu from an array definition

Returns a tab menu for a module Requires the JS function jumpToUrl() to be available

Parameters:
mixed $id is the "&id=" parameter value to be sent to the module, but it can be also a parameter array which will be passed instead of the &id=...
string $elementName it the form elements name, probably something like "SET[...]"
string $currentValue is the value to be selected currently.
array $menuItems is an array with the menu items for the selector box
string $script is the script to send the &id to, if empty it's automatically found
string $addParams is additional parameters to pass to the script.
Returns:
string HTML code for tab menu
Author:
Rene Fritz <r.fritz@colorcube.de>

Definition at line 1356 of file template.php.

References $content, $value, t3lib_div::deHSCentities(), and t3lib_div::implodeArrayForUrl().

template::getTabMenuRaw ( menuItems  ) 

Creates the HTML content for the tab menu

Parameters:
array Menu items for tabs
Returns:
string Table HTML private

Definition at line 1386 of file template.php.

References $content, and nbsp.

template::getVersionSelector ( id,
noAction = FALSE 
)

Creates the version selector for the page id inputted. Requires the core version management extension, "version" to be loaded.

Parameters:
integer Page id to create selector for.
boolean If set, there will be no button for swapping page.
Returns:
void

Definition at line 1693 of file template.php.

References $GLOBALS, t3lib_BEfunc::countVersionsOfRecordsOnPage(), t3lib_BEfunc::getRecord(), t3lib_BEfunc::getWorkspaceVersionOfRecord(), t3lib_extMgm::isLoaded(), t3lib_BEfunc::isPidInVersionizedBranch(), t3lib_div::linkThisScript(), and t3lib_BEfunc::selectVersionsOfRecord().

template::header ( text  ) 

Returns the header-bar in the top of most backend modules Closes section if open.

Parameters:
string The text string for the header
Returns:
string HTML content

Definition at line 746 of file template.php.

References sectionEnd().

Referenced by sectionHeader(), and startPage().

template::helpStyle (  ) 

Returns ' style='cursor:help;'' if the client supports CSS styles Use for -links to help texts

Returns:
string

Definition at line 383 of file template.php.

References $GLOBALS.

template::icons ( type,
styleAttribValue = '' 
)

Returns an image-tag with an 18x16 icon of the following types:

$type: -1: OK icon (Check-mark) 1: Notice (Speach-bubble) 2: Warning (Yellow triangle) 3: Fatal error (Red stop sign)

Parameters:
integer See description
string Value for style attribute
Returns:
string HTML image tag (if applicable)

Definition at line 1043 of file template.php.

Referenced by section().

template::initCharset (  ) 

Initialize the charset. Sets the internal $this->charset variable to the charset defined in $GLOBALS["LANG"] (or the default as set in this class) Returns the meta-tag for the document header

Returns:
string <meta> tag with charset from $this->charset or $GLOBALS['LANG']->charSet

Definition at line 998 of file template.php.

References $GLOBALS.

Referenced by startPage().

template::insertStylesAndJS ( content  ) 

Insert post rendering document style into already rendered content This is needed for extobjbase

Parameters:
string style-content to insert.
Returns:
string content with inserted styles

Definition at line 978 of file template.php.

References $content.

template::isCMlayers (  ) 

Returns true if click-menu layers can be displayed for the current user/browser Use this to test if click-menus (context sensitive menus) can and should be displayed in the backend.

Returns:
boolean

Definition at line 363 of file template.php.

References $GLOBALS.

template::issueCommand ( params,
rUrl = '' 
)

Returns a URL with a command to TYPO3 Core Engine (tce_db.php) See description of the API elsewhere.

Parameters:
string $params is a set of GET params to send to tce_db.php. Example: "&cmd[tt_content][123][move]=456" or "&data[tt_content][123][hidden]=1&data[tt_content][123][title]=Hello%20World"
string Redirect URL if any other that t3lib_div::getIndpEnv('REQUEST_URI') is wished
Returns:
string URL to tce_db.php + parameters (backpath is taken from $this->backPath)
See also:
t3lib_BEfunc::editOnClick()

Definition at line 348 of file template.php.

References $GLOBALS, and t3lib_div::getIndpEnv().

template::loadJavascriptLib ( lib  ) 

Includes a javascript library that exists in the core /typo3/ directory. The backpath is automatically applied

Parameters:
string $lib: Library name. Call it with the full path like "contrib/prototype/prototype.js" to load it
Returns:
void

Definition at line 1292 of file template.php.

Referenced by startPage().

template::makeShortcutIcon ( gvList,
setList,
modName,
motherModName = "" 
)

Returns a linked shortcut-icon which will call the shortcut frame and set a shortcut there back to the calling page/module

Parameters:
string Is the list of GET variables to store (if any)
string Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
string Module name string
string Is used to enter the "parent module name" if the module is a submodule under eg. Web>* or File>*. You can also set this value to "1" in which case the currentLoadedModule is sent to the shortcut script (so - not a fixed value!) - that is used in file_edit.php and wizard_rte.php scripts where those scripts are really running as a part of another module.
Returns:
string HTML content

Definition at line 441 of file template.php.

References $backPath, $GLOBALS, t3lib_div::getIndpEnv(), and makeShortcutUrl().

template::makeShortcutUrl ( gvList,
setList 
)

MAKE url for storing Internal func

Parameters:
string Is the list of GET variables to store (if any)
string Is the list of SET[] variables to store (if any) - SET[] variables a stored in $GLOBALS["SOBE"]->MOD_SETTINGS for backend modules
Returns:
string private
See also:
makeShortcutIcon()

Definition at line 478 of file template.php.

References $GLOBALS, t3lib_div::_GET(), t3lib_div::compileSelectedGetVarsFromArray(), and t3lib_div::implodeArrayForUrl().

Referenced by makeShortcutIcon().

template::menuTable ( arr1,
arr2 = array(),
arr3 = array() 
)

Constructs a table with content from the $arr1, $arr2 and $arr3. Used in eg. ext/belog/mod/index.php - refer to that for examples

Parameters:
array Menu elements on first level
array Secondary items
array Third-level items
Returns:
string HTML content,
..

Definition at line 1201 of file template.php.

References nbsp.

template::middle (  ) 

Originally it printed a kind of divider. Deprecated. Just remove function calls to it or call the divider() function instead.

Returns:
void

Definition at line 884 of file template.php.

template::moduleBody ( pageRecord = array(),
buttons = array(),
markerArray = array(),
subpartArray = array() 
)

Put together the various elements for the module <body> using a static HTML template

Parameters:
array Record of the current page, used for page path and info
array HTML for all buttons
array HTML for all other markers
Returns:
string Composite HTML

Definition at line 1881 of file template.php.

References t3lib_parsehtml::getSubpart().

template::parseTime (  ) 

Returns script parsetime IF ->parseTimeFlag is set and user is "admin" Automatically outputted in page end

Returns:
string

Definition at line 582 of file template.php.

References $GLOBALS, and t3lib_div::getIndpEnv().

Referenced by endPage().

template::redirectUrls ( thisLocation = ''  ) 

Returns JavaScript variables setting the returnUrl and thisScript location for use by JavaScript on the page. Used in fx. db_list.php (Web>List)

Parameters:
string URL to "this location" / current script
Returns:
string
See also:
typo3/db_list.php

Definition at line 541 of file template.php.

References t3lib_div::_GP(), and t3lib_div::linkThisScript().

template::rfw ( string  ) 

red-fontwrap. Returns the string wrapped in a -tag defining the color to be red

Parameters:
string Input string
Returns:
string Output string

Definition at line 1093 of file template.php.

template::section ( label,
text,
nostrtoupper = FALSE,
sH = FALSE,
type = 0,
allowHTMLinHeader = FALSE 
)

Begins an output section and sets header and content

Parameters:
string The header
string The HTML-content
boolean A flag that will prevent the header from being converted to uppercase
boolean Defines the type of header (if set, "<h3>" rather than the default "h4")
integer The number of an icon to show with the header (see the icon-function). -1,1,2,3
boolean If set, HTML tags are allowed in $label (otherwise this value is by default htmlspecialchars()'ed)
Returns:
string HTML content
See also:
icons(), sectionHeader()

Definition at line 767 of file template.php.

References icons(), sectionBegin(), and sectionHeader().

Referenced by endPage(), sectionBegin(), sectionEnd(), and startPage().

template::sectionBegin (  ) 

Begins an output section. Returns the

-begin tag AND sets the ->sectionFlag true (if the ->sectionFlag is not already set!) You can call this function even if a section is already begun since the function will only return something if the sectionFlag is not already set!

Returns:
string HTML content

Definition at line 843 of file template.php.

References section().

Referenced by section(), and sectionHeader().

template::sectionEnd (  ) 

Ends and output section Returns the -end tag AND clears the ->sectionFlag (but does so only IF the sectionFlag is set - that is a section is 'open') See sectionBegin() also.

Returns:
string HTML content

Definition at line 864 of file template.php.

References section().

Referenced by divider(), endPage(), and header().

template::sectionHeader ( label,
sH = FALSE,
addAttrib = '' 
)

Make a section header. Begins a section if not already open.

Parameters:
string The label between the<h3> or<h4> tags. (Allows HTML)
boolean If set,

is used, otherwise<h4> string Additional attributes to h-tag, eg. ' class=""' string HTML content

Definition at line 826 of file template.php.

References header(), and sectionBegin().

Referenced by section().

template::setModuleTemplate ( filename  ) 

Define the template for the module

Parameters:
string filename

Definition at line 1865 of file template.php.

template::spacer ( dist  ) 

Returns a blank

-section with a height

Parameters:
integer Padding-top for the div-section (should be margin-top but konqueror (3.1) doesn't like it :-(
Returns:
string HTML content

Definition at line 807 of file template.php.

template::startPage ( title  ) 

Returns page start This includes the proper header with charset, title, meta tag and beginning body-tag.

Parameters:
string HTML Page title for the header
Returns:
string Returns the whole header section of a HTML-document based on settings in internal variables (like styles, javascript code, charset, generator and docType)
See also:
endPage()

Definition at line 615 of file template.php.

References $GLOBALS, t3lib_div::callUserFunction(), docBodyTagBegin(), generator(), header(), initCharset(), loadJavascriptLib(), and section().

template::t3Button ( onClick,
label 
)

Returns an <input> button with the $onClick action and $label

Parameters:
string The value of the onclick attribute of the input tag (submit type)
string The label for the button (which will be htmlspecialchar'ed)
Returns:
string A <input> tag of the type "submit"

Definition at line 1072 of file template.php.

template::table ( arr,
layout = '' 
)

Returns a table based on the input $arr

Parameters:
array Multidim array with first levels = rows, second levels = cells
array If set, then this provides an alternative layout array instead of $this->tableLayout
Returns:
string The HTML table.

Definition at line 1159 of file template.php.

References $content, and $val.

template::template (  ) 

Constructor Imports relevant parts from global $TBE_STYLES (colorscheme)

Returns:
void

Definition at line 227 of file template.php.

References $GLOBALS, $TBE_STYLES, $temp_M, t3lib_div::_GET(), and t3lib_div::array_merge_recursive_overrule().

template::thisBlur (  ) 

Returns 'this.blur();' if the client supports CSS styles Use this in links to remove the underlining after being clicked

Returns:
string

Definition at line 373 of file template.php.

References $GLOBALS.

template::viewPageIcon ( id,
backPath,
addParams = 'hspace="3"' 
)

Makes link to page $id in frontend (view page) Returns an magnifier-glass icon which links to the frontend index.php document for viewing the page with id $id $id must be a page-uid If the BE_USER has access to Web>List then a link to that module is shown as well (with return-url)

Parameters:
integer The page id
string The current "BACK_PATH" (the back relative to the typo3/ directory)
string Additional parameters for the image tag(s)
Returns:
string HTML string with linked icon(s)

Definition at line 322 of file template.php.

References $backPath, and t3lib_div::getIndpEnv().

Referenced by getHeader().

template::wrapClickMenuOnIcon ( str,
table,
uid = '',
listFr = 1,
addParams = '',
enDisItems = '',
returnOnClick = FALSE 
)

Makes click menu link (context sensitive menu) Returns $str (possibly an <|img> tag/icon) wrapped in a link which will activate the context sensitive menu for the record ($table/$uid) or file ($table = file) The link will load the top frame with the parameter "&item" which is the table,uid and listFr arguments imploded by "|": rawurlencode($table.'|'.$uid.'|'.$listFr)

Parameters:
string String to be wrapped in link, typ. image tag.
string Table name/File path. If the icon is for a database record, enter the tablename from $TCA. If a file then enter the absolute filepath
integer If icon is for database record this is the UID for the record from $table
boolean Tells the top frame script that the link is coming from a "list" frame which means a frame from within the backend content frame.
string Additional GET parameters for the link to alt_clickmenu.php
string Enable / Disable click menu items. Example: "+new,view" will display ONLY these two items (and any spacers in between), "new,view" will display all BUT these two items.
boolean If set, will return only the onclick JavaScript, not the whole link.
Returns:
string The link-wrapped input string.

Definition at line 305 of file template.php.

References $backPath, $GLOBALS, and t3lib_div::shortMD5().

template::wrapInCData ( string  ) 

Returns string wrapped in CDATA "tags" for XML / XHTML (wrap content of <script> and <style> sections in those!)

Parameters:
string Input string