-
Notifications
You must be signed in to change notification settings - Fork 49
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TASK] Split up Configuration section (#197)
* [TASK] Split up Configuration section - Fluid-styled-content dependencies are moved to content mapping - TypoScript imports from site set are kept in a dedicated file - Site settings etc are also moved to a dedicated file - Reorder menu so that steps properly depend on each other Releases: main * Update Documentation/SiteSets/Index.rst Co-authored-by: mkiebele <[email protected]> --------- Co-authored-by: mkiebele <[email protected]>
- Loading branch information
Showing
5 changed files
with
149 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
:navigation-title: Site sets | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _site-sets-configuration: | ||
|
||
======================================== | ||
Site sets: Further configuration options | ||
======================================== | ||
|
||
.. versionadded:: 13.1 | ||
Site sets have been introduced with TYPO3 13.1. | ||
|
||
In step :ref:`Minimal site package - Create a basic site | ||
set <t3sitepackage:minimal-extension-siteset>` we created a basic site set for | ||
our site package. | ||
|
||
In step :ref:`content-mapping-site-set` we added dependencies to our site set. | ||
|
||
.. _settings-definitions-yaml-constants: | ||
|
||
Setting definition | ||
------------------ | ||
|
||
Settings definitions are used to set values that can be used in the TypoScript | ||
setup through out the project. Before they were kept in the file | ||
:file:`constants.typoscript`. Since TYPO3 v13 they can be stored in the file | ||
:file:`settings.definitions.yaml`. See | ||
`settings.definitions.yaml <https://github.com/TYPO3-Documentation/TYPO3CMS-Tutorial-SitePackage-Code/blob/main/Configuration/Sets/SitePackage/settings.definitions.yaml>`__ in Github. | ||
|
||
It is best practise to use them for values that might | ||
want to be changed later on like paths, ids of important pages (contact, | ||
imprint, a system folder that contains certain records, ...). | ||
|
||
.. todo: Add more content here |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,86 @@ | ||
.. include:: /Includes.rst.txt | ||
|
||
.. _file-setup-typoscript: | ||
.. _typoscript-configuration: | ||
|
||
================ | ||
TypoScript setup | ||
================ | ||
|
||
In step :ref:`Minimal site package - The TYPO3 Fluid | ||
version <t3sitepackage:minimal-extension-fluid>` we placed all TypoScript into | ||
the site set, file | ||
:file:`packages/site-package/Configuration/Sets/SitePackage/setup.typoscript`. | ||
|
||
In the following chapters we will need additional TypoScript setup | ||
configurations. | ||
|
||
Theoretically you could put all TypoScript into one big file and it would work | ||
fine. But you have better overview if you split it up in multiple files ordered | ||
by purpose. | ||
|
||
Familiarize yourself with the TypoScript `@import` syntax first: | ||
:ref:`TYPO3 Explained, @import syntax <t3coreapi:typoscript-syntax-includes>`. | ||
|
||
.. _typoscript-import: | ||
|
||
Import the TypoScript from a different location | ||
=============================================== | ||
|
||
Create a new folder called :path:`Configuration/TypoScript/Setup`. In this | ||
create a file called :file:`pageview.typoscript` and copy the content from | ||
file :file:`Configuration/Sets/SitePackage/setup.typoscript` | ||
into it. | ||
|
||
Then change the latter file to contain the following: | ||
|
||
.. code-block:: typoscript | ||
:caption: Configuration/Sets/SitePackage/setup.typoscript | ||
@import 'EXT:site_package/Configuration/TypoScript/Setup/pageview.typoscript' | ||
Flush the caches and preview the page. The output should be unchanged. | ||
|
||
.. _typoscript-import-wildcard: | ||
|
||
Import all TypoScript files from a folder using a wildcard | ||
========================================================== | ||
|
||
We will create more TypoScript files in the next steps. We could import them | ||
file by file. But as the order will not matter we can import all of them via | ||
wildcard: | ||
|
||
.. include:: /CodeSnippets/TypoScript/Setup.rst.txt | ||
|
||
Only files from the folder directly will be imported. If you create subfolders | ||
later on you have to import them separately. | ||
|
||
.. _typoscript-import-configuration: | ||
|
||
Structure of the `Configuration` directory | ||
========================================== | ||
|
||
Your :path:`Configuration` directory should now have the following structure: | ||
|
||
.. directory-tree:: | ||
:level: 4 | ||
:show-file-icons: true | ||
|
||
* EXT:my_sitepackage/Configuration | ||
|
||
* Sets | ||
|
||
* SitePackage | ||
|
||
* config.yaml | ||
* setup.typoscript | ||
|
||
* TypoScript | ||
|
||
* Setup | ||
|
||
* pageview.typoscript | ||
|
||
In the next steps you will create more TypoScript files to configure the | ||
:ref:`Content mapping <t3sitepackage:content-mapping>` and the | ||
:ref:`menus <t3sitepackage:main-menu-creation>`. |
Oops, something went wrong.