TSref/PAGE
This page is document in progress. TypoScript
PAGE
Pages are referenced by two main values. The "id" and "type".
The "id" points to the uid of the page (or the alias). Thus the page is found.
The "type" is used to define how the page should be rendered. This is primarily used with framesets, but also other special rendering needs, such as XML format or for Ajax purposes.
With framesets, the frameset normally has the type=0 (or not set) and the documents in the frameset would be defined with another type, eg. type=1 for the content-page.
You should explore the framesets of the TYPO3 sites around. Also look in the standard-templates for framesets.
It's a good habit to use type=1 for the main page of a website with frames. For sites that doesn't use framesets, the page type is normally 0..
Another good habit is to use "page" as the toplevel object name for the content page on a website.
Most of this code is executed in pagegen.php:
| Property: | Data type: | Description: | Default: |
| typeNum | typeNumber | This decides the the typeId of the page. The value defaults to 0 for the first
found PAGE object, but it MUST be set and be unique as soon you use more than one such object (watch this if you use frames on your page)! |
0 |
| 1,2,3,4... | cObject | ||
| wrap | wrap | Wraps the content of the the cObject array | |
| stdWrap | stdWrap | Wraps the content of the the cObject array with stdWrap options | |
| bodyTagCObject | cObject | This is default bodytag overridden by ?.bodyTag? if that is set. | |
| bodyTag | <tag> | Bodytag on the page
Example:
<body bgcolor="{$bgCol}">
<body bgcolor="#FFFFFF">
| |
| headTag | <tag> | Head-tag if alternatives are wanted
<head> | |
| bodyTagMargins | int | margins in the bodytag.
Property:
.useCSS = 1 (boolean) - will add a "BODY {margin: ...}" line to the HTML document's inline style - for XHTML compliance.
Example: value 4 adds leftmargin="4" topmargin="4" marginwidth="4" marginheight="4" to the bodyTag. | |
| bodyTagAdd | string | This content is added to the end of the <body> tag. | |
| bgImg | imgResource | Background image on the page. This is automatically added to the body tag. | |
| frameSet | FRAMESET | if any properties are set in this property, the page is made into a frameset. | |
| meta | META | HTML meta tag contents, like author, copyright etc. | |
| shortcutIcon | resource | Favicon of the page. Create a reference to an icon here.
Browsers that support favicons display them in the browser's address bar, next to the site's name in lists of bookmarks, and next to the page's title in a Tabbed Document Interface. Note: This must be a valid ".ico"-file (iconfile) | |
| headerData | COA | Inserts content in the header section. Could be JavaScript, Meta tags, other stylesheet references or whatever you please.
Is inserted after all the style definitions. | |
| config | CONFIG | configuration for the page. Any entries override the same entries in the toplevel object "config". | |
| includeJS.[array] | resource | Inserts one or more script tags.
The file definition must be a valid "resource" datatype, otherwise nothing is inserted. Each file has optional properties: .type - sets the MIME type of the script (default: text/javascript) # Example:
includeJS {
file1 = fileadmin/helloworld.js
file1.type = application/x-javascript
file2 = javascript_uploaded_to_template*.js
}
| |
| includeLibs | array of strings | With this you may include PHP files. This does the same as "includeLibrary" in ->CONFIG but this can include more than one file. These files are included after the file of includeLibrary.
NOTE: The toplevel object "includeLibs" and the scripts defined with this property is added to each other. Script keys (that is the "array of strings"-value, like below "ts_address") from this property of the page overrides any scripts-keys from the toplevel "includeLibs" property. The script file names are of the datatype "resource". Example: includeLibs.ts_address = lib_filename.php includeLibs.ts_shop = lib_filename.php Please do not use the prefix shown above ("ts_") as this is reserved by the standard TYPO3 libraries. | |
| CSS Stylesheets: | |||
| stylesheet | resource | Inserts a stylesheet in the <HEAD>-section of the page;
<link rel="stylesheet" href="[resource]"> | |
| includeCSS.[array] | resource | Inserts a stylesheet (just like the .stylesheet property) by allows to setting up more than a single stylesheet, because you can enter files in an array.
The file definition must be a valid "resource" datatype, otherwise nothing is inserted. Each file has optional properties: .media - setting the media attribute of the style tag. .title - setting the title of the style tag. .alternate - If set (boolean) then the rel attribute will be "alternate stylesheet" .import - If set (boolean) then the @import way of including a stylesheet is used instead of includeCSS {file1 = fileadmin/mystylesheet1.css file2 = stylesheet_uploaded_to_template*.css file2.title = High contrast file2.media = print } |