.. include:: /Includes.rst.txt .. _page: .. _page-datatype: .. _object-type-page: .. _tlo-page: =========== PAGE & page =========== This defines what is rendered in the frontend. PAGE is an object type. A good habit is to use :typoscript:`page` as the top-level object name for the content-page on a website. TYPO3 does not initialize :typoscript:`page` by default. You must initialize this explicitly, e.g.:: page = 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. Most of this code is executed in the PHP script :file:`typo3/sysext/frontend/Classes/Page/PageGenerator.php`. Multiple pages ============== **The "type"** is used to define how the page should be rendered. This is primarily used with different representations of the same content. Your default page will most likely have type 0 while a JSON stream with the same content could go with type 1. A good habit is to use "page" as the top-level object name for the content-page on a website. Most of this code is executed in the PHP script *typo3/sysext/frontend/Classes/Page/PageGenerator.php*. ======= When rendering pages in the frontend, TYPO3 uses the GET parameter **"type"** to define how the page should be rendered. This is primarily used with different representations of the same content. Your default page will most likely have type 0 (which is the default) while a JSON stream with the same content could go with type 1. The property :ref:`typeNum ` defines for which type, the page will be used. Example:: page = PAGE page.typeNum = 0 page { # set properties ... } json = PAGE json.typeNum = 1 # ... In the frontend, the original URLs that are generated will include the type and an id parameter (for the page id), example (for json and page id 22): :samp:`/index.php?id=22&type=1` Guidelines ---------- Good, general PAGE object names to use are: * **page** for the main page with content * **json** for a json stream with content * **xml** for a XML stream with content These are just recommendations. However, especially the name page for the content bearing page is very common and most documentation will imply that your main page object is called page. Properties ^^^^^^^^^^ .. container:: ts-properties ============================== ================================= ====================== ======================== Property Data Type :ref:`stdwrap` Default ============================== ================================= ====================== ======================== `1,2,3,4...`_ cObject `bodyTag`_ `bodyTagAdd`_ :ref:`data-type-string` `bodyTagCObject`_ cObject `bodyTagMargins`_ :ref:`data-type-integer` `config`_ ->CONFIG `CSS\_inlineStyle`_ :ref:`data-type-string` `cssInline`_ ->CARRAY `footerData`_ ->CARRAY `frameSet`_ ->FRAMESET `headerData`_ ->CARRAY `headTag`_ /stdWrap `includeCSS.[array]`_ :ref:`data-type-resource` `includeCSSLibs.[array]`_ :ref:`data-type-resource` `includeJS.[array]`_ :ref:`data-type-resource` `includeJSFooter.[array]`_ :ref:`data-type-resource` `includeJSFooterlibs.[array]`_ :ref:`data-type-resource` `includeJSLibs.[array]`_ :ref:`data-type-resource` `inlineLanguageLabelFiles`_ *(array of strings)* `inlineSettings`_ *(array of strings)* `javascriptLibs`_ *(array of strings)* `jsFooterInline`_ ->CARRAY `jsInline`_ ->CARRAY `meta`_ :ref:`->META ` `shortcutIcon`_ :ref:`data-type-resource` `stdWrap`_ :ref:`stdWrap ` `stylesheet`_ :ref:`data-type-resource` `typeNum`_ :ref:`data-type-integer` 0 `wrap`_ wrap ============================== ================================= ====================== ======================== Property details ^^^^^^^^^^^^^^^^ .. ### BEGIN~OF~TABLE ### .. _setup-page-1-2-3-4: 1,2,3,4... """""""""" .. container:: table-row Property 1,2,3,4... Data type cObject Description These properties can be used to define any number of objects, just like you can do with a :ref:`COA content object `. .. _setup-page-bodytag: bodyTag """"""" .. container:: table-row Property bodyTag Data type Description Body tag on the page **Example:** .. code:: html Default .. _setup-page-bodytagadd: bodyTagAdd """""""""" .. container:: table-row Property bodyTagAdd Data type string Description This content is added to the end of the bodyTag. .. _setup-page-bodytagcobject: bodyTagCObject """""""""""""" .. container:: table-row Property bodyTagCObject Data type cObject Description This is the default body tag. It is overridden by ".bodyTag", if that is set. **Note:** Additionally to the body tag properties noted here, there also is the property "config.disableBodyTag", which - if set - disables body tag generation independently from what might be set here. .. _setup-page-bodytagmargins: bodyTagMargins """""""""""""" .. container:: table-row Property bodyTagMargins Data type integer Description margins in the body tag. **Property:** .useCSS = 1 (boolean) - will set a "BODY {margin: ...}" line in the in-document style declaration - for XHTML compliance. **Example:** :: bodyTagMargins = 4 This adds *leftmargin="4" topmargin="4" marginwidth="4" marginheight="4"* to the bodyTag. .. _setup-page-config: config """""" .. container:: table-row Property config Data type ->CONFIG Description Configuration for the page. Any entries made here override the same entries in the top-level object "config". .. _setup-page-css-inlinestyle: CSS\_inlineStyle """""""""""""""" .. container:: table-row Property CSS\_inlineStyle Data type string Description This value is just passed on as CSS. **Note:** To make TYPO3 actually output these styles as *inline* CSS (in-document CSS encapsulated in