---
title: "PAGEVIEW"
manual: "TypoScript Explained"
version: "main"
permalink: "https://docs.typo3.org/permalink/t3tsref:cobj-pageview@main"
source: "ContentObjects/Pageview/Index.rst"
rendered: "2026-09-19T06:55:14+00:00"
---

# PAGEVIEW {#cobj-pageview}

This content object has very specific conventions and
defaults, that requires (and allows) less configuration as compared to using
[FLUIDTEMPLATE](https://docs.typo3.org/permalink/t3tsref:cobj-template@main).

The benefit is that following these conventions means less boilerplate code
to maintain.

If you follow these conventions, a few directories and files must follow the
structure outlined below.

> [!TIP]
> Chapters [The TYPO3 Fluid version](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/MinimalExample/Index.html#minimal-extension-fluid)
> and [Display the content elements on your page](https://docs.typo3.org/m/typo3/tutorial-sitepackage/main/en-us/ContentMapping/Index.html#content-mapping)
> of the Site Package Tutorial give practical examples on how to use
> the `PAGEVIEW` object.

**Table of contents**

-   [Example: Display a page with Fluid templates](https://docs.typo3.org/permalink/t3tsref:example-display-a-page-with-fluid-templates@main)
-   [Template naming and locations](https://docs.typo3.org/permalink/t3tsref:template-naming-and-locations@main)
-   [Default variables in Fluid templates](https://docs.typo3.org/permalink/t3tsref:default-variables-in-fluid-templates@main)
-   [Properties](https://docs.typo3.org/permalink/t3tsref:properties@main)
-   [Examples](https://docs.typo3.org/permalink/t3tsref:examples@main)

## Example: Display a page with Fluid templates {#cobj-pageview-properties-example}

**EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths {
      100 = EXT:my_sitepackage/Resources/Private/PageView/
    }
    variables {
      parentPageTitle = TEXT
      parentPageTitle.data = levelfield:-1:title
    }
    dataProcessing {
      10 = page-content
      20 = menu
      20.as = mainMenu
    }
  }
}

```

## Template naming and locations {#cobj-pageview-template-naming}

To ensure proper rendering, the following requirements and
fallback mechanisms apply:

### Target path structure {#cobj-pageview-template-naming-path}

-   The target directory **must contain a folder named :directory:\`Pages/\`**.
-   This folder must contain Fluid templates in :file`*.html` format.

### Template naming convention {#cobj-pageview-template-naming-conventions}

-   The Fluid template file **must** match the name of the selected backend layout
    of your current page.
-   The first letter of the Fluid template file must be **uppercase**.

### Fallback behavior when no backend layout is defined {#cobj-pageview-template-naming-fallback}

-   If the page record does not specify a backend layout, TYPO3 tries to detect
    next-level backend layouts by traversing up the page rootline.
-   If still no backend layout could be found, TYPO3 falls back to `Default.html`.
-   If you explicitly set the backend layout to `none`, a Fluid template
    with name `None.html` will be used.

## Default variables in Fluid templates {#cobj-pageview-data}

The following variables are available by default in the Fluid template.

Additional variables can be defined with property
[variables](https://docs.typo3.org/permalink/t3tsref:confval-pageview-variables@main).

**Default variables**

**language**

-   **language**

    -   *Type:* `\TYPO3\CMS\Core\Site\Entity\SiteLanguage`
    -   *Example:* [Example: Display the site title in the current language](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-data-language-example@main)

    The current `SiteLanguage`
    object, see also
    [the SiteLanguage object](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/AccessingSiteConfiguration.html#sitehandling-sitelanguage-object).

**page**

-   **page**

    -   *Type:* `\TYPO3\CMS\Frontend\Page\PageInformation`
    -   *Example:* [Example: Display the title and abstract of the current page](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-data-page-example@main)

    The current `PageInformation` as object. See also
    [Frontend page information](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/RequestLifeCycle/RequestAttributes/FrontendPageInformation.html#typo3-request-attribute-frontend-page-information).

**settings**

-   **settings**

    -   *Type:* array
    -   *Example:* [Example: Use TypoScript constant in a Fluid template](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-data-settings-example@main)

    The variable `{settings}` contains all TypoScript
    [constants](https://docs.typo3.org/permalink/t3tsref:typoscript-syntax-constants@main) that are set on the current
    page. Settings from the site can be accessed via the [site](https://docs.typo3.org/permalink/t3tsref:confval-pageview-data-site@main) with
    `{site.settings}`

**site**

-   **site**

    -   *Type:* `\TYPO3\CMS\Core\Site\Entity\Site`
    -   *Example:* [Example: Link to the root page of the current site](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-data-site-example@main)

    The current `Site` object. See
    also [the Site object](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/SiteHandling/AccessingSiteConfiguration.html#sitehandling-site-object).

### Examples for using default variables {#cobj-pageview-data-example}

#### Example: Display the site title in the current language {#cobj-pageview-data-language-example}

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <main role="main">
    <p>The site title in the current template is: {language.websiteTitle}</p>
  </main>
</f:section>

```

#### Example: Display the title and abstract of the current page {#cobj-pageview-data-page-example}

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <main role="main">
    <p>The title of the page with id {page.id} is: {page.pageRecord.title}. It has the
      following abstract:</p>
    <p>{page.pageRecord.abstract}</p>
  </main>
</f:section>

```

#### Example: Use TypoScript constant in a Fluid template {#cobj-pageview-data-settings-example}

Let us assume, the current page loads the following TypoScript constants:

**EXT:my_sitepackage/Configuration/Sets/Main/constants.typoscript**

```html
page {
  uids {
    dataPrivacy = 42
    contact = 85
    imprint = 86
  }
}

```

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <main role="main">
    <p>...</p>
  </main>
  <footer>
    See also our <f:page pageUid="{settings.page.uids.dataPrivacy}">data privacy policy</f:page>
  </footer>
</f:section>

```

#### Example: Link to the root page of the current site {#cobj-pageview-data-site-example}

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <main role="main">
    <p>Go to the root page: <f:link.page pageUid="{site.rootPageId}">Home</f:link.page></p>
    <p>...</p>
  </main>
</f:section>

```

## Properties {#cobj-pageview-properties}

**PAGEVIEW properties**

**cache**

-   **cache**

    -   *Type:* [cache](https://docs.typo3.org/permalink/t3tsref:cache@main)

    See [cache function description](https://docs.typo3.org/permalink/t3tsref:cache@main) for details.

**dataProcessing.\[key\]**

-   **dataProcessing.\[key\]**

    -   *Type:* [path](https://docs.typo3.org/permalink/t3tsref:data-type-path@main) with [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Example:* [Example: Display a main menu and a breadcrumb on the page](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-dataprocessing-example@main)

    Add one or multiple [data processors](https://docs.typo3.org/permalink/t3tsref:dataprocessing@main). The
    sub-property `options` can be used to pass parameters to the
    processor class.

    It is recommended to use the  [PageContentFetchingProcessor](https://docs.typo3.org/permalink/t3tsref:pagecontentfetchingprocessor@main)
    to fetch the content elements from the page, respecting the
    [backend layout](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Backend/BackendLayout.html#be-layout).

**paths.\[priority\]**

-   **paths.\[priority\]**

    -   *Type:* [path](https://docs.typo3.org/permalink/t3tsref:data-type-path@main) with [stdWrap](https://docs.typo3.org/permalink/t3tsref:stdwrap@main)
    -   *Example:* [Example: Define a path that contains all templates](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-paths-example@main)
    -   *Example 2:* [Example: Define fallbacks for a template paths](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-paths-example-extended@main)

    Sets an array of paths for the Fluid templates, usually
    `EXT:my_extension/Resources/Private/PageView/` or a
    path like `EXT:my_extension/Resources/Private/PageView/MyPage`.

    The templates are expected in a subfolder `Pages`.

    Fluid partials are looked up in a sub-directory called `Partials`,
    layouts in `Layouts`.

    The name of the used page layout ([Backend layout](https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Backend/BackendLayout.html#be-layout))
    is resolved automatically.

    The paths are evaluated from highest to lowest priority.

**variables.\[variable_name\]**

-   **variables.\[variable_name\]**

    -   *Type:* [Content Object](https://docs.typo3.org/permalink/t3tsref:cobject@main)
    -   *Example:* [Example: Make additional variables available in the Fluid template](https://docs.typo3.org/permalink/t3tsref:cobj-pageview-variables-example@main)

    Sets variables that should be available in Fluid.

## Examples {#cobj-pageview-examples}

### Example: Display a main menu and a breadcrumb on the page {#cobj-pageview-dataprocessing-example}

**EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths {
      100 = EXT:my_sitepackage/Resources/Private/PageView/
    }
    dataProcessing {
      10 = menu
      10 {
        as = mainMenu
        titleField = nav_title // title
        expandAll = 1
      }
      20 = menu
      20 {
        as = breadcrumb
        special = rootline
        special.range = 0|-1
        includeNotInMenu = 0
      }
    }
  }
}

```

The page template could look like this:

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <f:render partial="Navigation/MainNavigation.html" arguments="{mainMenu: mainMenu}"/>
  <main role="main">
    <f:render partial="Navigation/Breadcrumb.html" arguments="{breadcrumb: breadcrumb}"/>
    <p>...</p>
  </main>
</f:section>

```

With the following partials:

**EXT:my_sitepackage/Resources/Private/PageView/Partials/Navigation/Breadcrumb.fluid.html**

```html
<f:if condition="{breadcrumb}">
  <ol class="breadcrumb">
    <f:for each="{breadcrumb}" as="item">
      <li class="breadcrumb-item{f:if(condition: item.current, then: ' active')}" >
        <a class="breadcrumb-link" href="{item.link}" title="{item.title}">
          <span class="breadcrumb-text">{item.title}</span>
        </a>
      </li>
    </f:for>
  </ol>
</f:if>

```

And

**EXT:my_sitepackage/Resources/Private/PageView/Partials/Navigation/MainNavigation.fluid.html**

```html
<ul class="nav nav-pills">
  <f:for each="{mainMenu}" as="menuItem">
    <li class="nav-item {f:if(condition: menuItem.hasSubpages, then: 'dropdown')}">
      <f:if condition="{menuItem.hasSubpages}">
        <f:then>
          <!-- Item has children -->
          <a class="nav-link dropdown-toggle" data-bs-toggle="dropdown" href="#" role="button" aria-expanded="false">
            {menuItem.title}
          </a>
          <div class="dropdown-menu">
            <f:for each="{menuItem.children}" as="menuItemLevel2">
              <f:link.page pageUid="{menuItemLevel2.data.uid}"
                class="dropdown-item {f:if(condition: menuItemLevel2.active, then: 'active')}">
                {menuItemLevel2.title}
              </f:link.page>
            </f:for>
          </div>
        </f:then>
        <f:else>
          <!-- Item has no children -->
          <f:link.page pageUid="{menuItem.data.uid}" class="nav-link {f:if(condition: menuItem.active, then:'active')}">
            {menuItem.title}
          </f:link.page>
        </f:else>
      </f:if>
    </li>
  </f:for>
</ul>

```

### Example: Define a path that contains all templates {#cobj-pageview-paths-example}

This is a basic definition of a `PAGEVIEW` object with only one path to the
templates:

**EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page.10 = PAGEVIEW
page.10.paths.100 = EXT:my_sitepackage/Resources/Private/PageView/
```

The content of the folder could look like this:

-   EXT:my_sitepackage/Resources/Private/PageView/
    -   Layouts
        -   Default.html
        -   WithoutHeader.html
    -   Pages
        -   Default.html
        -   StartPage.html
        -   TwoColumns.html
        -   With_sidebar.html
    -   Partials
        -   Footer.html
        -   Sidebar.html
        -   Menu.html

> [!NOTE]
> If the name of the backend layout starts with a lowercase letter,
> the first letter of the template name is transformed into upper case.
>
> However the template name is not necessarily transferred into CamelCase.

So for backend layout named "with_sidebar", the template file is
then resolved to
`EXT:my_sitepackage/Resources/Private/PageView/Pages/With_sidebar.fluid.html`.

If the backend layout is named "TwoColumns" it is resovled to
`EXT:my_sitepackage/Resources/Private/PageView/Pages/TwoColumns.fluid.html`.

For all these templates
[partial](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Render.html#viewhelper-argument-typo3-cms-fluid-viewhelpers-renderviewhelper-partial)
are expected in folder
`EXT:my_sitepackage/Resources/Private/PageView/Partials` and
[layouts](https://docs.typo3.org/other/typo3/view-helper-reference/main/en-us/Global/Layout.html#typo3fluid-fluid-layout) in
`EXT:my_sitepackage/Resources/Private/PageView/Layouts`.

### Example: Define fallbacks for a template paths {#cobj-pageview-paths-example-extended}

You can use the directories defined in [paths.\[priority\]](https://docs.typo3.org/permalink/t3tsref:confval-pageview-paths@main) to
define fallback directories for the templates:

**EXT:site_package/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10.paths {
    100 = EXT:my_basic_sitepackage/Resources/Private/PageView/
    200 = EXT:my_general_sitepackage/Resources/Private/PageView/
    300 = EXT:my_special_sitepackage/Resources/Private/PageView/
  }
}

```

The template for a page with a certain backend layout is first searched in
`EXT:my_special_sitepackage/Resources/Private/PageView/Pages/` then in
`EXT:my_general_sitepackage/Resources/Private/PageView/Pages/` and last
in `EXT:my_basic_sitepackage/Resources/Private/PageView/Pages/`.

### Example: Make additional variables available in the Fluid template {#cobj-pageview-variables-example}

**EXT:my_sitepackage/Configuration/Sets/Main/setup.typoscript**

```typoscript
page = PAGE
page {
  10 = PAGEVIEW
  10 {
    paths {
      100 = EXT:my_sitepackage/Resources/Private/PageView/
    }
    variables {
      parentPageTitle = TEXT
      parentPageTitle.data = levelfield:-1:title
      another_variable =< lib.anotherVariable
    }
  }
}

```

The following variables are now available in the Fluid template:

**EXT:my_sitepackage/Resources/Private/PageView/Pages/Default.fluid.html**

```html
<f:layout name="Default" />
<f:section name="Main">
  <f:render partial="Navigation/MainNavigation.html" arguments="{_all}"/>

  <main role="main">
    <p>The current parent page has the title {parentPageTitle}</p>
    <p>Another variable is {another_variable}</p>
  </main>
</f:section>

```
