TSRef - TypoScript Reference

7.1.5. "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. Here 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. With no-frames sites type is normally zero.

Another good habit is to use "page" as the toplevel-objectname for the content-page on a website.

Most of this codes is executed in the PHP-script 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 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

 

 

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

->CARRAY

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:(page)]

 


Valid XHTML 1.0!