Skip to content

Commit a028c74

Browse files
committed
[TASK] Move extension configuration to places where it belongs and clean up content
Drop extension icon as it does not play a role outside the extension manager Releases: main, 13.4
1 parent e7cb4f9 commit a028c74

File tree

4 files changed

+99
-206
lines changed

4 files changed

+99
-206
lines changed
Lines changed: 4 additions & 198 deletions
Original file line numberDiff line numberDiff line change
@@ -1,203 +1,9 @@
1+
:orphan:
12
.. include:: /Includes.rst.txt
2-
.. highlight:: php
3-
4-
.. _extension-configuration:
53

64
=======================
7-
Extension Configuration
5+
Extension configuration
86
=======================
97

10-
.. contents::
11-
12-
.. _extension-configuration-composer:
13-
14-
Composer configuration :file:`composer.json`
15-
============================================
16-
17-
In this tutorial we assumed, you
18-
:ref:`installed TYPO3 with Composer <extension-installation>`.
19-
Therefore the extension needs to contain its own :file:`composer.json`.
20-
21-
.. include:: /CodeSnippets/ExtensionConfiguration/ComposerJson.rst.txt
22-
23-
For historic reasons TYPO3 extension names are written in
24-
lower case words and separated by underscores if there are more than one. This
25-
is known as the extension key. The directory containing the extension should have
26-
the same name as the extension key. Composer package names are written in
27-
lower-case words but are by convention separated with dashes if there
28-
is more than one word.
29-
30-
At the top of the :file:`composer.json` file we see the Composer package name
31-
`t3docs/site-package` (with a dash) and at the bottom we see the TYPO3
32-
extension key in the extra section - :file:`site_package` (with an underscore).
33-
The Composer "name" consists of a vendor name followed by a forward slash and the
34-
lowercase extension name with dashes.
35-
36-
.. hint::
37-
Make sure you don't mix up your underscores and dashes otherwise Composer
38-
will not find your site-package extension.
39-
40-
.. _extension-icon:
41-
42-
Extension icon
43-
==============
44-
45-
Every extension can feature an icon using an SVG, PNG or GIF file.
46-
The image should be stored in :file:`Resources/Public/Icons/`.
47-
48-
It is recommended that you use an SVG file called :file:`Extension.svg`. The
49-
icon is displayed in the extension manager
50-
(:ref:`see Public directory <t3coreapi:extension-Resources-Public>`).
51-
52-
.. _make-typoscript-available:
53-
.. _site_set:
54-
55-
Set for providing TypoScript
56-
============================
57-
58-
.. versionchanged:: 13.1
59-
In TYPO3 v13.1 and above the TypoScript files are made available as
60-
sets and included in the site. For TYPO3 v12 read the section in
61-
the tutorial for TYPO3 v12.4:
62-
:ref:`Make TypoScript available (TYPO3 v12.4) <t3sitepackage-12:make-typoscript-available>`.
63-
64-
In order to make the TypoScript files available, we have created in section
65-
:ref:`TypoScript configuration <t3sitepackage:typoscript-configuration>` we
66-
create a site set that can be included by the site configuration later-on.
67-
68-
Create a folder: :path:`Configuration/Sets/MySitePackage/` and put a file
69-
called :file:`config.yaml` into it:
70-
71-
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-config.rst.txt
72-
73-
Line 1 defines the name of the set. As the example site-package extension only
74-
provides one set, the name of the set should be the same as the
75-
:ref:`composer name <extension-configuration-composer>`.
76-
77-
In line 4 and 5 dependencies are defined. In this example the site package
78-
depends on :composer:`typo3/cms-fluid-styled-content`, therefore the sets provided by this
79-
system extension are included as dependency. By doing so all settings
80-
and TypoScript definitions provided by the extension are automatically included.
81-
82-
In the same folder we can place a file called :file:`settings.yaml` that we use
83-
to override some default settings of :composer:`typo3/cms-fluid-styled-content`:
84-
85-
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-settings.rst.txt
86-
87-
Here we override some values for maximal image width in text-media content
88-
elements, we enable a lightbox for images and set paths for overriding the
89-
templates of that extension.
90-
91-
Then we put a file called :file:`setup.typoscript` into this folder. We use
92-
this file to include all TypoScript needed from the folder
93-
:path:`Configuration/TypoScript`. It would also be possible to place the
94-
TypoScript directly into this file. But we want to split our TypoScript into
95-
different files.
96-
97-
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-setup.rst.txt
98-
99-
As we only have a few lines of TypoScript constants we define them directly in
100-
a file called :file:`constants.typoscript` in this folder:
101-
102-
103-
104-
Last we add a file called :file:`page.tsconfig` which includes the backend page
105-
layouts we create in :ref:`backend-page-layouts`:
106-
107-
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-page-tsconfig.rst.txt
108-
109-
.. _ec-directory-structure:
110-
111-
Directory and file structure
112-
============================
113-
114-
Let's review the directory and file structure of the sitepackage extension as
115-
it stands now.
116-
117-
.. todo: replace TwoColumns with Subpage (tsconfig, html, svg)
118-
.. todo: replace files in TypoScript/Setup
119-
120-
.. directory-tree::
121-
:level: 2
122-
:show-file-icons: true
123-
124-
* site_package
125-
126-
* Configuration
127-
128-
* Sets
129-
130-
* SitePackage
131-
132-
* config.yaml
133-
* page.tsconfig
134-
* settings.definitions.yaml
135-
* settings.yaml
136-
* setup.typoscript
137-
138-
* TsConfig
139-
140-
* Page
141-
142-
* PageLayout
143-
144-
* Default.tsconfig
145-
* TwoColumns.tsconfig
146-
147-
* TypoScript
148-
149-
* Setup
150-
151-
* Page.typoscript
152-
* Part1PageViewSection.typoscript
153-
* Part2CssFileInclusion.typoscript
154-
* Part4GlobalConfiguration.typoscript
155-
.. * Part5MenuProcessor.typoscript
156-
.. * Part6ProcessedContent.typoscript
157-
158-
* Resources
159-
160-
* Private
161-
162-
* Layouts
163-
164-
* Default.html
165-
166-
* Partials
167-
168-
* Jumbotron.html
169-
170-
* Templates
171-
172-
* Pages
173-
174-
* Default.html
175-
* TwoColumns.html
176-
177-
* Public
178-
179-
* Css
180-
181-
* website.css
182-
183-
* Icons
184-
185-
* BackendLayouts
186-
187-
* default.svg
188-
* twoColumns.svg
189-
190-
* Extension.svg
191-
192-
* Images
193-
194-
* logo.svg
195-
196-
* JavaScript
197-
198-
* website.js
199-
200-
* composer.json
201-
202-
At this point we can install the sitepackage extension in an TYPO3 instance,
203-
which we will do in the next step.
8+
Content was moved, see :ref:`Composer configuration composer.json <t3sitepackage:extension-configuration-composer>`,
9+
:ref:`Site sets: Further configuration options <t3sitepackage:site-sets-configuration>`.

Documentation/Index.rst

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,6 @@ A working copy of the site package extension can be retrieved from the
154154
TypoScript/Index
155155
MainMenuCreation/Index
156156
SiteSets/Index
157-
ExtensionConfiguration/Index
158157
Introduction/Index
159158
Summary/Index
160159

Documentation/MinimalExample/Index.rst

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ On saving, the site package is added to your site configuration file, which chan
125125
.. literalinclude:: _config.yaml.diff
126126

127127
.. _minimal-extension-typoscript:
128+
.. _make-typoscript-available:
128129

129130
The TypoScript-only version
130131
===========================
@@ -195,3 +196,29 @@ Create a file named :file:`Default.html` in folder
195196
Clear all caches and preview the web page.
196197

197198
Learn more about using Fluid Templates in chapter :ref:`fluid-templates`.
199+
200+
.. _extension-configuration-composer:
201+
202+
Composer configuration :file:`composer.json`
203+
============================================
204+
205+
In step :ref:`Create a minimal TYPO3 extension <t3sitepackage:minimal-extension>`
206+
a file called :file:`composer.json` was created for you:
207+
208+
.. include:: /CodeSnippets/ExtensionConfiguration/ComposerJson.rst.txt
209+
210+
At the top of the :file:`composer.json` file we see the Composer package name
211+
`t3docs/site-package` (with a dash) and at the bottom we see the TYPO3
212+
extension key in the extra section - :file:`site_package` (with an underscore).
213+
The Composer "name" consists of a vendor name followed by a forward slash and the
214+
lowercase extension name with dashes.
215+
216+
When you reference files in your extension, the extension key is used, for
217+
example when setting your favicon in TypoScript:
218+
219+
.. code-block:: typoscript
220+
:caption: package/site_package/Configuration/Sets/SitePackage/setup.typoscript
221+
222+
page {
223+
shortcutIcon = EXT:site_package/Ressources/Public/Icons/favicon.ico
224+
}

Documentation/SiteSets/Index.rst

Lines changed: 68 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,16 @@
1-
:navigation-title: Site sets
1+
:navigation-title: Settings
22
.. include:: /Includes.rst.txt
33

4+
.. _extension-configuration:
5+
.. _ec-directory-structure:
46
.. _site-sets-configuration:
57

6-
========================================
7-
Site sets: Further configuration options
8-
========================================
8+
============================================
9+
Site settings: Further configuration options
10+
============================================
911

1012
.. versionadded:: 13.1
11-
Site sets have been introduced with TYPO3 13.1.
13+
Site sets and settings therein have been introduced with TYPO3 13.1.
1214

1315
In step :ref:`Minimal site package - Create a basic site
1416
set <t3sitepackage:minimal-extension-siteset>` we created a basic site set for
@@ -18,6 +20,67 @@ In step :ref:`content-mapping-site-set` we added dependencies to our site set.
1820

1921
.. contents::
2022

23+
.. _site_set:
24+
25+
The site set
26+
============
27+
28+
.. versionchanged:: 13.1
29+
In TYPO3 v13.1 and above the TypoScript files are made available as
30+
sets and included in the site. For TYPO3 v12 read the section in
31+
the tutorial for TYPO3 v12.4:
32+
:ref:`Make TypoScript available (TYPO3 v12.4) <t3sitepackage-12:make-typoscript-available>`.
33+
34+
In step :ref:`Create a basic site set <t3sitepackage:minimal-extension-siteset>`
35+
we already created a basic site set for your site package.
36+
37+
In step :ref:`Include the site sets of fluid-styled-content as
38+
dependency <t3sitepackage:content-mapping-site-set>` we included the dependencies
39+
to the site sets of :composer:`typo3/cms-fluid-styled-content`.
40+
41+
Your site set configuration should now look like this:
42+
43+
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-config.rst.txt
44+
45+
Line 1 defines the name of the set. As the example site-package extension only
46+
provides one set, the name of the set should be the same as the
47+
:ref:`composer name <extension-configuration-composer>`.
48+
49+
In line 4 and 5 dependencies are defined. In this example the site package
50+
depends on :composer:`typo3/cms-fluid-styled-content`, therefore the sets provided by this
51+
system extension are included as dependency. By doing so all settings
52+
and TypoScript definitions provided by the extension are automatically included.
53+
54+
Your site set folder now contains the following files:
55+
56+
.. directory-tree::
57+
:level: 2
58+
:show-file-icons: true
59+
60+
* site_package/Configuration/Sets/SitePackage
61+
62+
* config.yaml
63+
* page.tsconfig
64+
* setup.typoscript
65+
66+
.. _site_settings:
67+
68+
Introduce site settings to configure fluid-styled-content
69+
=========================================================
70+
71+
Place a file called :file:`settings.yaml` in the folder
72+
:path:`Configuration/Sets/SitePackage`.
73+
74+
We override some default settings of the site set
75+
:ref:`Site set "Fluid Styled
76+
Content" <typo3/cms-fluid-styled-content:site-set-fluid-styled-content>`:
77+
78+
.. include:: /CodeSnippets/ExtensionConfiguration/SitePackage-settings.rst.txt
79+
80+
Here we override some values for maximal image width in text-media content
81+
elements, we enable a lightbox for images and set paths for overriding the
82+
templates of that extension.
83+
2184
.. _settings-definitions-yaml-constants:
2285

2386
Setting definition
@@ -32,5 +95,3 @@ setup through out the project. Before they were kept in the file
3295
It is best practise to use them for values that might
3396
want to be changed later on like paths, ids of important pages (contact,
3497
imprint, a system folder that contains certain records, ...).
35-
36-
.. todo: Add more content here

0 commit comments

Comments
 (0)