Datatype: | Examples: | Comment: | Default: |
|---|---|---|---|
<tag> | <BODY bgcolor="red"> | ||
align | right | right / left / center Decides alignment, typically in HTML-tags | left |
VHalign | Hori.align = right and Vert.align = center: r , c | r/c/l , t/c/b Horizontal (right, center, left) , Vertical align (top / center / bottom) | l , t |
resource | From the resourcefield: toplogo*.gif Reference to filesystem: fileadmin/picture.gif | 1) A reference to a file from the resource-field in the template. You can write the exact filename or you can include an asterisk (*) as wildcard. It's recommended to include a "*" before the fileextension (see example to the left). This will ensure that the file is still referenced correct even if the template is copied and the file will have it's name prepended with numbers!! 2) If the value contains a "/" it's expected to be a reference (absolute or relative) to a file on the file-system instead of the resource-field. No support for wildcards. | |
imgResource | Here "file" is an imgResource: file = toplogo*.gif file.width = 200 GIFBUILDER: file = GIFBUILDER file { ... (GIFBUILDER-properties here) } | 1) A "resource" (see above) + imgResource-properties (see example to the left and object-reference below) Filetypes can be anything among the allowed types defined in the configuration variable $TYPO3_CONF_VARS["GFX"]["imagefile_ext"] (localconf.php). Standard is pdf,gif,jpg,jpeg,tif,bmp,ai,pcx,tga,png. 2) GIFBUILDER-object | |
HTML-code | <B>Some text in bold</B> | pure HTML-code | |
target | _top _blank content | target in <A>-tag. This is normally the same value as the name of the root-level object that defines the frame. | |
imageExtension | jpg web(gif or jpg ..) | Image extensions can be anything among the allowed types defined in the global variable $TYPO3_CONF_VARS["GFX"]["imagefile_ext"] (localconf.php). Standard is pdf,gif,jpg,jpeg,tif,bmp,ai,pcx,tga,png. The value "web" is special. This will just ensure that an image is converted to a web imageformat (gif or jpg) if it happens not to be already! | |
degree | -90 to 90, integers | ||
posint / int+ | Positive integer | ||
int | integer (sometimes used generally though another type would have been more appropriate, like "pixels") | ||
str / string / value | string. (sometimes used generally though another type would have been more appropriate, like "align") | ||
boolean | 1 | boolean non-empty strings (but not zero) are "true" | |
rotation | integer, degrees from 0 - 360 | ||
x,y,w,h | 10,10,5,5 | x,y is the offset from the upper left corner. w,h is the width and height | |
HTML-color | red #ffeecc | HTML-color codes: Black = "#000000" Silver = "#C0C0C0" Gray = "#808080" White = "#FFFFFF" Maroon = "#800000" Red = "#FF0000" Purple = "#800080" Fuchsia = "#FF00FF" Green = "#008000" Lime = "#00FF00" Olive = "#808000" Yellow = "#FFFF00" Navy = "#000080" Blue = "#0000FF" Teal = "#008080" Aqua = "#00FFFF" | |
GraphicColor | red(HTML-color) #ffeecc (HTML-color) 255,0,255(RGB-integers) Extra: red : *0.8("red" is darkend by factor 0.8) #ffeecc : +16("ffeecc" is going to #fffedc because 16 is added) | The color can be given as HTML-colors or as a comma-seperated list of RGB-values (integers) You can add an extra parameter that will modify the color mathematically: Syntax: [colordef] : [modifier] where modifier can be and integer which is added/subtracted to the three RGB-channels or a floatingpoint with an "*" before, which will then multiply the values with that factor. | |
page_id | this 34 | A page id (int) or "this" (=current page id) | |
pixels | 345 | pixel-distance | |
list | item,item2,item3 | list of values | |
margins | This sets leftmargin to 10 and bottom-margin to 5. Top and right is not set (zero) 10,0,0,5 | l,t,r,b left, top, right, bottom | |
wrap | This will cause the value to be wrapped in a font-tag coloring the value red: <font color="red"> | </font> | <...> | </...> Used to wrap something. The part on the left and right of the vertical line is placed on the left and right side of the value. | |
linkWrap | This will make a link to the root-level of a website: <A HREF="?id={0}"> | </A> | <.. {x}.> | </...> {x}; x is an integer (0-9) and points to a key in the PHP-array rootLine. The key is equal to the level the current page is on measured relatively to the root of the website. If the key exists the uid of the level that key pointed to is inserted instead of {x}. Thus we can insert page_ids from previous levels. | |
case | upper | "upper" / "lower" Case-conversion | |
space | 5 | 5 | "before | after" Used for content and sets space "before | after". | |
date-conf | d-m-y(dd-mm-yy format) | See PHP function Date()! a - "am" or "pm" A - "AM" or "PM" d - day of the month, numeric, 2 digits (with leading zeros) D - day of the week, textual, 3 letters; i.e. "Fri" F - month, textual, long; i.e. "January" h - hour, numeric, 12 hour format H - hour, numeric, 24 hour format i - minutes, numeric j - day of the month, numeric, without leading zeros l (lowercase 'L') - day of the week, textual, long; i.e. "Friday" m - month, numeric M - month, textual, 3 letters; i.e. "Jan" s - seconds, numeric S - English ordinal suffix, textual, 2 characters; i.e. "th", "nd" U - seconds since the epoch Y - year, numeric, 4 digits w - day of the week, numeric, 0 represents Sunday y - year, numeric, 2 digits z - day of the year, numeric; i.e. "299" | |
strftime-conf | Date "DD-MM-YY" = %e:%m:%y Time "HH:MM:SS" = %H:%M:%S or just %T | %a - abbreviated weekday name according to the current locale %A - full weekday name according to the current locale %b - abbreviated month name according to the current locale %B - full month name according to the current locale %c - preferred date and time representation for the current locale %C - century number (the year divided by 100 and truncated to an integer, range 00 to 99) %d - day of the month as a decimal number (range 00 to 31) %D - same as %m/%d/%y %e - day of the month as a decimal number, a single digit is preceded by a space (range ' 1' to '31') %h - same as %b %H - hour as a decimal number using a 24-hour clock (range 00 to 23) %I - hour as a decimal number using a 12-hour clock (range 01 to 12) %j - day of the year as a decimal number (range 001 to 366) %m - month as a decimal number (range 01 to 12) %M - minute as a decimal number %n - newline character %p - either `am' or `pm' according to the given time value, or the corresponding strings for the current locale %r - time in a.m. and p.m. notation %R - time in 24 hour notation %S - second as a decimal number %t - tab character %T - current time, equal to %H:%M:%S %u - weekday as a decimal number [1,7], with 1 representing Monday %U - week number of the current year as a decimal number, starting with the first Sunday as the first day of the first week %V - The ISO 8601:1988 week number of the current year as a decimal number, range 01 to 53, where week 1 is the first week that has at least 4 days in the current year, and with Monday as the first day of the week. %W - week number of the current year as a decimal number, starting with the first Monday as the first day of the first week %w - day of the week as a decimal, Sunday being 0 %x - preferred date representation for the current locale without the time %X - preferred time representation for the current locale without the date %y - year as a decimal number without a century (range 00 to 99) %Y - year as a decimal number including the century %Z - time zone or name or abbreviation %% - a literal `%' character | |
UNIX-time | Seconds to 07/04 2000 23:58: 955144722 | Seconds since 1/1 1970... | |
path | fileadmin/stuff/ | path relative to the directory from which we operate. | |
<tag>-data | Example: <frameset>-data: row could be '150,*' | ||
<tag>-params | Example: <frameset>-params could be 'border="0" framespacing="0"' | ||
getText | get content from the $cObj->data-array[header]: = field : header get content from the $cObj->parameters-array[color]: = parameters : color get content from the $GLOBALS["TSFE"]->register[color]: = register : color get the title of the page on the first level of the rootline: = leveltitle : 1 get the title of the page on the level right below the current page AND if that is not present, walt to the bottom of the rootline until there's a title: = leveltitle : -2 , slide get the id of the root-page of the website (level zero) = leveluid : 0 Gets the value of the user defined field “user_myExtField” in the root line (requires additional config in TYPO3_CONF_VARS to include field!) = levelfield : -1 , user_myExtField , slide get the env var HTTP_REFERER: = getenv : HTTP_REFERER get the env variable $HTTP_COOKIE_VARS[some_cookie]: = global : HTTP_COOKIE_VARS | some_cookie get the current time formatted dd-mm-yy: = date : d-m-y get the current page-title: = page : title get the current value: = current : 1 get input value from query string, (&stuff=) = GPvar : stuff get input value from query string, (&stuff[key]=) = GPvar : stuff | key get the current id = TSFE : id get the value of the header of record with uid 234 from table tt_content: = DB : tt_content:234:header Gets the title of the page right before the start of the current website: = fullRootLine : -1, title Returns localized label for logout button = LLL:EXT:css_styled_content/pi1/locallang.x:login.logout Outputs the current root-line visually in HTML: = debug : rootLine Gets path to file relative file to siteroot possibly placed in an extension: path:EXT:ie7/js/ie7-standard.js | This returns a value from somewhere in PHP-array, defined by the type. The syntax is "type : pointer" field : [fieldname from the current $cObj->data-array in the cObj.] As default the $cObj->data-array is $GLOBALS["TSFE"]->page (record of the current page!) In TMENU: $cObj->data is set to the page-record for each menuitem. In CONTENT/RECORDS $cObj->data is set to the actual record In GIFBUILDER $cObj->data is set to the data GIFBUILDER is supplied with. parameters : [fieldname from the current $cObj->parameters-array in the cObj.] See ->parseFunc! register : [fieldname from the $GLOBALS["TSFE"]->register] See cObject "LOAD_REGISTER" leveltitle, leveluid, levelmedia: [levelTitle, uid or media in rootLine, 0- , negative = from behind, “ , slide” parameter forces a walk to the bottom of the rootline until there's a “true” value to return. Useful with levelmedia.] levelfield: Like “leveltitle” et al. but where the second parameter is the rootLine field you want to fetch. Syntax: [pointer, integer], [fieldname], [“slide”] global : [GLOBAL-var, split with | if you want to get from an array! DEPRECATED, use GPvar, TSFE or getenv] date : [date-conf] page : [current page record] current : 1 (gets 'current' value) level : 1 (gets the rootline level of the current page) GPvar: Value from GET or POST method. Use this instead of global TSFE: Value from TSFE global main object getenv: Value from environment vars getIndpEnv: Value from t3lib_div::getIndpEnv() DB: Value from database, syntax is [tablename] : [uid] : [field]. Any record from a table in TCA can be selected here. Only marked-deleted records does not return a value here. fullRootLine : This gets the title “1. page before” in a page tree like the one below provided we are are the page “Here you are!” (or “Site root”) and this TypoScript is in the template with root at “Site root”. Red numbers indicate what values of keynumber would point to: - Page tree root -2 |- 1. page before -1 |- Site root (root template here!) 0 |- Here you are! 1 LLL: Reference to a locallang (php or xml) label. Reference consists of [fileref]:[labelkey] path: path to a file, possibly placed in an extension, returns empty if the file doesn't exist. cObj: [internal variable from list: “parentRecordNumber”]: For CONTENT and RECORDS cObjects that are returned by a select query, this returns the row number (1,2,3,...) of the current cObject record. debug: Returns HTML formated content of PHP variable defined by keyword. Available keys are “rootLine”, “fullRootLine”, “data” -------------------- Getting array/object elements. You can fetch the value of an array/object by splitting it with a pipe “|”.Example: TSFE:fe_user|user|username Getting more values. By separating the value of getText with "//" (double slash) you let getText fetch the first value. If it appears empty ("" or zero) the next value is fetched and so on. Example: = field:header // field:title // field:uid This gets "title" if "header" is empty. If "title" is also empty it gets field "uid" fullRootLine : Getting a value from the rootline (TSFE->rootLine) going all the way to the root of the page tree. [keynumber, fieldname, “slide”] Keynumber is relative to the current site root, so negative numbers refer to subsequent levels below the site root. Fieldname is the name of the datafield to get. For “slide”, see levelmedia type above. | |
dir | returns a list of all pdf, gif and jpf-filer from fileadmin/files/ sorted by their name reversely and with the full path (with "fileadmin/files/" prepended) fileadmin/files/ | pdf,gif,jpg | name | r | true | [path relative to the webroot of the site] | [list of valid extensions] | [sorting: name, size, ext, date] | [reverse: "r"] | [return full path: boolean Files matching is returned in a comma-separated string. Note: The value of config-option "lockFilePath" must equal the first part of the path. Thereby the path is locked to that folder. | |
function-name | Function: user_reverseString Method in class: user_stringReversing->reverseString | Indicates a function or method in a class to call. See more information at the USER cObject. Depending on implementation the class or function name (but not the method name) should probably be prefixed with “user_”. This can be changed in the TYPO3_CONF_VARS config though. Also the function / method is normally called with 2 parameters, typ. $conf (TS config) and $content (some content to be processed and returned) Also if you call a method in a class, it is checked (when using the USER/USER_INT objects) whether a class with the same name, but prefixed with “ux_” is present and if so, this class is instantiated instead. See “Inside TYPO3” document for more information on extending the classes in TYPO3! |
[tsref:(datatypes)]
This is some "data-types" that might be mentioned and valid values are shown here below:
Datatype: | Examples: | Comment: | Default: |
|---|---|---|---|
cObject | HTML / TEXT / IMAGE .... (see "Content Objects" section also called "cObjects") | ||
frameObj | FRAMESET / FRAME | ||
menuObj | GMENU / TMENU / IMGMENU / JSMENU .sectionIndex .alternativeSortingFields (see the menu-object pages later) | ||
GifBuilderObj | TEXT / SHADOW / OUTLINE / EMBOSS / BOX / IMAGE / EFFECT |