Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,5 @@
.. code-block:: typoscript
:caption: EXT:site_package/Configuration/Sets/SitePackage/page.tsconfig

@import './PageTSconfig/PageLayout/*.tsconfig'
@import './PageTsConfig/'
@import './PageTsConfig/BackendLayouts/'
Original file line number Diff line number Diff line change
Expand Up @@ -5,43 +5,40 @@
:caption: EXT:site_package/Configuration/Sets/SitePackage/settings.definitions.yaml

categories:
mySitepackage:
label: 'My Sitepackage'
mySitepackage.templates:
SitePackage:
label: 'Site Package'
SitePackage.templates:
label: 'Templates'
parent: mySitepackage
mySitepackage.layout:
parent: SitePackage
SitePackage.layout:
label: 'Layout'
parent: mySitepackage
mySitepackage.seo:
label: 'SEO settings'
parent: mySitepackage
parent: SitePackage

settings:
mySitepackage.template_path:
label: 'Template path'
category: mySitepackage.templates
description: 'Path to the templates of the site package.'
SitePackage.template_path:
label: 'Page template path'
category: SitePackage.templates
description: 'Path to the templates of the Site Package.'
type: string
default: 'EXT:site_package/Resources/Private/Templates/'
default: 'EXT:site_package/Resources/Private/PageView/'

mySitepackage.logo:
SitePackage.logo:
label: 'Logo'
category: mySitepackage.layout
description: 'Path to the logo of the site package.'
category: SitePackage.layout
description: 'Path to the logo of Site Package.'
type: string
default: 'EXT:site_package/Resources/Public/Images/logo.svg'

mySitepackage.logo-alt:
SitePackage.logo-alt:
label: 'Logo Alt text'
category: mySitepackage.layout
category: SitePackage.layout
description: 'Alternative text of the logo for the visually impaired'
type: string
default: 'Logo'

mySitepackage.favicon:
SitePackage.favicon:
label: 'Favicon'
description: 'This icon is displayed in search engine results and in the browser tab'
category: mySitepackage.seo
category: SitePackage.layout
type: string
default: 'EXT:site_package/Resources/Public/Icons/favicon.ico'
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,14 @@
:linenos:

styles:
templates:
layoutRootPath: EXT:site_package/Resources/Private/ContentElements/Layouts
partialRootPath: EXT:site_package/Resources/Private/ContentElements/Partials
templateRootPath: EXT:site_package/Resources/Private/ContentElements/Templates
content:
textmedia:
maxW: 1200
maxWInText: 600
linkWrap:
lightboxEnabled: true
lightboxCssClass: lightbox
templates:
layoutRootPath: EXT:site_package/Resources/Private/ContentElements/Layouts
partialRootPath: EXT:site_package/Resources/Private/ContentElements/Partials
templateRootPath: EXT:site_package/Resources/Private/ContentElements/Templates
content:
textmedia:
maxW: 1200
maxWInText: 600
linkWrap:
lightboxEnabled: true
lightboxCssClass: lightbox
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
styles:
templates:
layoutRootPath: EXT:my_site_package/Resources/Private/Layouts/ContentElements
partialRootPath: EXT:my_site_package/Resources/Private/Partials/ContentElements
templateRootPath: EXT:my_site_package/Resources/Private/Templates/ContentElements
layoutRootPath: EXT:my_site_package/Resources/Private/ContentElements/Layouts
partialRootPath: EXT:my_site_package/Resources/Private/ContentElements/Partials
templateRootPath: EXT:my_site_package/Resources/Private/ContentElements/Templates
content:
textmedia:
maxW: 1200
Expand Down
6 changes: 3 additions & 3 deletions Documentation/CodeSnippets/Fluid/Header.rst.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
.. Extracted from EXT:site_package/Resources/Private/Templates/Partials/Header.html
.. Extracted from EXT:site_package/Resources/Private/PageView/Partials/Header.html

.. code-block:: html
:caption: EXT:site_package/Resources/Private/Templates/Partials/Header.html
:caption: EXT:site_package/Resources/Private/PageView/Partials/Header.html
:linenos:

<nav class="navbar navbar-expand-lg bg-body-tertiary mb-4">
Expand All @@ -12,7 +12,7 @@
</button>
<div class="collapse navbar-collapse" id="menuToggler">
<f:link.page pageUid="{site.rootPageId}" class="navbar-brand">
<f:image src="{settings.mySitepackage.logo}" alt="{settings.mySitepackage.logo-alt}" class="pe-3" />
<f:image src="{settings.SitePackage.logo}" alt="{settings.SitePackage.logo-alt}" class="pe-3" />
{site.configuration.websiteTitle}
</f:link.page>

Expand Down
2 changes: 1 addition & 1 deletion Documentation/CodeSnippets/Fluid/Image.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
:linenos:

<html xmlns:f="http://typo3.org/ns/TYPO3/CMS/Fluid/ViewHelpers" data-namespace-typo3-fluid="true">
<f:media class="image-embed-item rounded-circle" file="{file}" width="{dimensions.width}" height="{dimensions.height}" alt="{file.alternative}" title="{file.title}" loading="{settings.media.lazyLoading}" decoding="{settings.media.imageDecoding}" />
<f:media class="image-embed-item rounded" file="{file}" width="{dimensions.width}" height="{dimensions.height}" alt="{file.alternative}" title="{file.title}" loading="{settings.media.lazyLoading}" decoding="{settings.media.imageDecoding}" />
</html>
2 changes: 1 addition & 1 deletion Documentation/CodeSnippets/Fluid/Layout.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. code-block:: html
:caption: EXT:my_site_package/Resources/Private/Templates/Layouts/Layout.html
:caption: EXT:my_site_package/Resources/Private/PageView/Layouts/Layout.html
:linenos:

<f:asset.css identifier="bootstrap" href="EXT:my_site_package/Resources/Public/Libaries/bootstrap-5.3.3-dist/css/bootstrap.min.css" />
Expand Down
4 changes: 2 additions & 2 deletions Documentation/CodeSnippets/Fluid/Menu.rst.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
.. Extracted from EXT:site_package/Resources/Private/Templates/Partials/Navigation/Menu.html
.. Extracted from EXT:site_package/Resources/Private/PageView/Partials/Navigation/Menu.html

.. code-block:: html
:caption: EXT:site_package/Resources/Private/Templates/Partials/Navigation/Menu.html
:caption: EXT:site_package/Resources/Private/PageView/Partials/Navigation/Menu.html
:linenos:

<ul class="navbar-nav me-auto mb-2 mb-lg-0">
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CodeSnippets/Fluid/MenuSitemap.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<ul class="list-group ps-4 mt-2">
<f:for each="{menu}" as="page">
<li class="list-group-item">
<a href="{page.link}" class="text-decoration-none text-dark {f:if(condition: '{level} < 2', then: 'fw-bold')}">
<a href="{page.link}" class="text-decoration-none text-dark level-{level}{f:if(condition: '{level} < 2', then: ' fw-bold')}">
<span>{page.title}</span>
</a>
<f:render section="Menu" arguments="{menu: page.children, level: '{level + 1}'}" />
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CodeSnippets/Fluid/MenuSubpages.rst.txt
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
<ul class="nav flex-column">
<f:for each="{menu}" as="page">
<li class="nav-item">
<a href="{page.link}" class="nav-link{f:if(condition: 'page.active', then: 'active')}">
<a href="{page.link}" class="nav-link{f:if(condition: 'page.active', then: ' active')}">
<span>{page.title}</span>
</a>
</li>
Expand Down
2 changes: 1 addition & 1 deletion Documentation/CodeSnippets/Fluid/PartialContent.rst.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.. code-block:: html
:caption: Resources/Private/Templates/Partials/Content.html
:caption: Resources/Private/PageView/Partials/Content.html
:linenos:

<f:for each="{records}" as="record">
Expand Down
18 changes: 0 additions & 18 deletions Documentation/CodeSnippets/Fluid/PartialJumbotron.rst.txt

This file was deleted.

16 changes: 16 additions & 0 deletions Documentation/CodeSnippets/Fluid/Stage.rst.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
.. Extracted from EXT:site_package/Resources/Private/PageView/Partials/Stage.html

.. code-block:: html
:caption: EXT:site_package/Resources/Private/PageView/Partials/Stage.html
:linenos:

<f:for each="{content.stage.records}" as="record">
<div class="container">
<f:cObject
typoscriptObjectPath="{record.mainType}"
data="{record}"
table="{record.mainType}"
/>
</div>
</f:for>
8 changes: 4 additions & 4 deletions Documentation/CodeSnippets/Fluid/TemplateDefault.rst.txt
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
.. Generated by https://github.com/TYPO3-Documentation/t3docs-codesnippets
.. Extracted from EXT:site_package/Resources/Private/Templates/Pages/Default.html
.. Extracted from EXT:site_package/Resources/Private/PageView/Pages/Default.html

.. code-block:: html
:caption: EXT:site_package/Resources/Private/Templates/Pages/Default.html
:caption: EXT:site_package/Resources/Private/PageView/Pages/Default.html
:linenos:

<f:layout name="Layout"/>
<f:layout name="PageLayout"/>
<f:section name="Main">

<f:render partial="Jumbotron" arguments="{_all}"/>
<f:render partial="Stage" arguments="{_all}"/>

<div class="container">
<f:render partial="Content" arguments="{records: content.main.records}"/>
Expand Down
4 changes: 2 additions & 2 deletions Documentation/CodeSnippets/PageLayout/_Subpage.tsconfig
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ mod.web_layout.BackendLayouts {
1 {
columns {
1 {
name = Jumbotron
name = Stage
colspan = 2
colPos = 1
identifier = jumbotron
identifier = stage
slideMode = slide
}
}
Expand Down
19 changes: 13 additions & 6 deletions Documentation/CodeSnippets/codesnippets.php
Original file line number Diff line number Diff line change
Expand Up @@ -47,23 +47,30 @@
# code Snippets Fluid
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Pages/Default.html',
'sourceFile' => 'EXT:site_package/Resources/Private/PageView/Pages/Default.html',
'targetFileName' => 'Fluid/TemplateDefault.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/Templates/Pages/Default.html',
'caption' => 'EXT:site_package/Resources/Private/PageView/Pages/Default.html',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Partials/Header.html',
'sourceFile' => 'EXT:site_package/Resources/Private/PageView/Partials/Header.html',
'targetFileName' => 'Fluid/Header.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/Templates/Partials/Header.html',
'caption' => 'EXT:site_package/Resources/Private/PageView/Partials/Header.html',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/Templates/Partials/Navigation/Menu.html',
'sourceFile' => 'EXT:site_package/Resources/Private/PageView/Partials/Navigation/Menu.html',
'targetFileName' => 'Fluid/Menu.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/Templates/Partials/Navigation/Menu.html',
'caption' => 'EXT:site_package/Resources/Private/PageView/Partials/Navigation/Menu.html',
'showLineNumbers' => true
],
[
'action' => 'createCodeSnippet',
'sourceFile' => 'EXT:site_package/Resources/Private/PageView/Partials/Stage.html',
'targetFileName' => 'Fluid/Stage.rst.txt',
'caption' => 'EXT:site_package/Resources/Private/PageView/Partials/Stage.html',
'showLineNumbers' => true
],
[
Expand Down
2 changes: 1 addition & 1 deletion Documentation/ContentElementRendering/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ into the folder :path:`vendor` during installation via Composer. You can find
the files belonging to Fluid Styled Content in folder
:path:`vendor/typo3/cms-fluid-styled-content` therefore. This folder is
structured similarly to your site package extension and you can find the original
templates in folder :path:`Resources/Private/Templates` here.
templates in folder :path:`Resources/Private/PageView` here.

By convention the templates of Fluid Styled Content have the name of the `CType` in CamelCase. Copy file
:path:`vendor/typo3/cms-fluid-styled-content/Resources/Private/Templates/MenuSubpages.html`
Expand Down
23 changes: 12 additions & 11 deletions Documentation/ContentMapping/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ contain the content, into its own section. This section is however still filled
with dummy content:

.. literalinclude:: _codesnippets/_SectionMain.html
:caption: Resources/Private/Templates/Pages/Default.html
:caption: Resources/Private/PageView/Pages/Default.html

.. contents::

Expand Down Expand Up @@ -57,9 +57,10 @@ newly created file is loaded within the page tree of your site automatically:
This file automatically includes all `.tsconfig` files from the designated folder
in which we will store the page layouts.

We now create a default page layout with one column and row for the jumbotron:
We now create a default page layout with two areas: One for the main content and
one for the stage.

.. literalinclude:: /CodeSnippets/PageLayout/_Default.tsconfig
.. literalinclude:: _codesnippets/_Default.tsconfig
:language: typoscript
:caption: EXT:my_site_package/Configuration/TsConfig/Page/PageLayout/Default.tsconfig
:linenos:
Expand Down Expand Up @@ -89,12 +90,12 @@ Choose the page layout in the page properties
---------------------------------------------

Switch to the new backend layout and save the page properties. In the
:guilabel:`Page` module you will see two columns called "Jumbotron" and
:guilabel:`Page` module you will see two areas called "Stage" and
"Main Content" now.

If you followed step
:ref:`Load the example data automatically <t3sitepackage:load-example-data>`
the areas "Jumbotron" and "Main" should already contain some example content.
the areas "Stage" and "Main" should already contain some example content.

.. include:: /Images/AutomaticScreenshots/CreateNewContentElement.rst.txt

Expand Down Expand Up @@ -136,15 +137,15 @@ You can debug this variable in the main section of your template using the
:ref:`Debug ViewHelper <f:debug> <t3viewhelper:typo3-fluid-debug>`:

.. literalinclude:: _codesnippets/_SectionMainDebug.diff
:caption: Resources/Private/Templates/Pages/Default.html
:caption: Resources/Private/PageView/Pages/Default.html

The debug output after clearing all caches and previewing the page should look
like this:

.. figure:: _images/contents_debug.png
:alt: Screenshot of the debug output of {content}

The debug output should contain sections "jumbotron" and "main"
The debug output should contain sections "stage" and "main"

.. tip::
Does your debug output show "NULL" instead? Check the following:
Expand All @@ -161,7 +162,7 @@ like this:
TypoScript mapping in Fluid template
====================================

Open the file :file:`Resources/Private/Templates/Page/Default.html` and locate the
Open the file :file:`Resources/Private/PageView/Page/Default.html` and locate the
main content area. It contains a headline (look for the :code:`<h2>`-tags) and
some dummy content (look for the :code:`<p>`-tags).

Expand All @@ -170,7 +171,7 @@ rendering each content element using the
:ref:`CObject ViewHelper <f:cObject> <t3viewhelper:typo3-fluid-cobject>`:

.. literalinclude:: _codesnippets/_SectionMainRender.diff
:caption: Resources/Private/Templates/Pages/Default.html (diff)
:caption: Resources/Private/PageView/Pages/Default.html (diff)

For content elements the main type is always `tt_content`. Therefore we include
the TypoScript object :typoscript:`tt_content` here. It is defined in the TypoScript
Expand All @@ -197,7 +198,7 @@ the records of the page layout area to be rendered as variable `records` to
the partial:

.. literalinclude:: _codesnippets/_SectionMainRenderPartial.diff
:caption: Resources/Private/Templates/Pages/Default.html (diff)
:caption: Resources/Private/PageView/Pages/Default.html (diff)

The partial then looks like this:

Expand Down Expand Up @@ -230,7 +231,7 @@ Next steps
:glob:

TypoScript
Jumbotron
Stage
SubpageLayout
AddContent
*
Loading
Loading