De:TSref/PAGE
From TYPO3Wiki
| TypoScript Referenz - PAGE |
|
||||
This page is document in progress. TypoScript (Liste TypoScript)
[edit] PAGE
Seiten werden in wesentlichen durch zwei Werte bestimmt. Die Seiten ID "id" und der Ausgabe Typ "type". Die "id" entspricht der uid der Seite (oder dem alias).
Der Typ "type" wird verwendet um festzulegen, wie TYPO3 die Seite rendern soll. Das kann z.B. verwendet werden um die unterschiedlichen Seiten eines Framesets zu definieren (jedes Frameset hat eine eigene Typ-Nummer (type Parameter in der Url korrespondiert mit der definierten typeNum eines TypoScript Page-Objektes).
In der Regel wird der type für die Standard-Ansicht nicht verwendet. Für die Druckausgabe, PDF-Ausgabe oder einen RSS-Feed werden dann unterschiedliche PAGE-Objekte mit entsprechend unterschiedlichen typeNum definiert.
Üblicherweise wird das Page-Objekt mit der typeNum=0 ebenfalls "page" genannt. So wird meistens in TypoScript-Beispielen davon ausgegangen, dass ein page-Objekt definiert ist.
(Das PHP-Skript "pagegen.php" setzt das PAGE-Objekt um.)
| Eigenschaft | Datentyp | Kommentar | Standardwert |
| typeNum | Typ-Nummer | Entspricht dem Parameter &type= in der URL. Über den Parameter &type= wird das Objekt mit der gleichen typeNum ausgegeben. Der Default-Wert des ersten PAGE-Objektes ist 0.
Die Typ-Nummer muss eindeutig sein. Wenn mehrere PAGE Objekte verwendet werden, müssen diese alle einen unterschiedlichen typeNum haben. | 0 |
| 1,2,3,4... | cObject | Das PAGE Objekt besitzt die Eigenschaft eines Content Objekt Arrays. Es können beliebig viele Objekte erzeugt werden. Die Nummerierung legt die Ausgabe der Objekte fest. Zwischen den Ziffern dürfen Lücken existieren. Es werden aber nur ganze Zahlen interpretiert.
page = PAGE page.10 = TEXT page.10.value = Anfang der Webseite page.50 = TEXT page.50.value = Ende der Webseite | |
| wrap | wrap | Wrapped den gesammten Inhalt des Content Objekt Arrays.
page.wrap = <div>davor|danach</div> | |
| stdWrap | stdWrap | Wendet die stdWrap Funktion auf das Content Objekt Array an | |
| bodyTagCObject | cObject | Ersetzt den Bodytag, er wird allerdings von der Eigenschaft .bodyTag überschrieben, wenn diese nicht leer ist. | |
| bodyTag | <tag> | Der Body-Tag der Seite
Beispiel:
<body bgcolor="{$bgCol}">
<body bgcolor="#FFFFFF">
| |
| headTag | <tag> | Der Head-Tag, falls ein bestimmter gewünscht ist.
<head> | |
| bodyTagMargins | int | margins in the bodytag.
Property:
.useCSS = 1 (boolean) - will set a “BODY {margin: ...}” line in the in-document style declaration - 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 bodyTag. | |
| bgImg | imgResource | Background image on the page. This is automatically added to the body-tag. | |
| frameSet | FRAMESET | if any properties is set to this property, the page is made into a frameset. | |
| meta | META | HTML-Meta Definitonen, z.B. Autor, Copyright usw. | |
| 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 JavaScripts, meta-tags, other stylesheet references.
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 (Java)Scripts in <script> tags.
The file definition must be a valid "resource" datatype, otherwise nothing is inserted. Each file has optional properties: .style - setting 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-filenames 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 will probably be used by the standard TYPO3 libraries that will appear in the future. | |
| 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 <link> Example:
includeCSS {
file1 = fileadmin/mystylesheet1.css
file2 = stylesheet_uploaded_to_template*.css
file2.title = High contrast
file2.media = print
}
| |
| CSS_inlineStyle | string | This value is just passed on as inline css (in-document css encapsulated in style-tags) | |
| insertClassesFromRTE | boolean | If set, the classes for the Rich Text Editor configured in Page TSconfig is inserted in as the first thing in the Style-section right after the setting of the stylesheet.
.add_mainStyleOverrideDefs = [* / list of tags ] - will add all the “RTE.default. mainStyleOverride_add” - tags configured as well. Might be deprecated soon. Most likely the RTE should be configured by the stylesheet instead. Stay tuned... | |
| noLinkUnderline | boolean | Disables link-underlining. Uses in-document stylesheet.
Deprecated. Use stylesheet instead. | |
| hover | HTML-color | The color of a link when the mouse moves over it! (only MSIE). Uses in-document stylesheet.
Deprecated. Use stylesheet instead. | |
| hoverStyle | string | Additional style information to the hover-color.
Example: page.hoverStyle = font: bold; text-decoration: none; Deprecated. Use stylesheet instead. | |
| smallFormFields | boolean | Renders formfields like textarea, input and select-boxes small with "verdana size 1" font.
Uses in-document stylesheet. Tip: Use this together with the config-option "compensateFieldWidth" set to "0.6" for netscape-browsers in order to render the small form fields in the same width! Deprecated. Use stylesheet instead. | |
| adminPanelStyles | boolean | Will include CSS styles for the Admin Panel. |
[tsref:(cObject).PAGE]
