|
| 1 | +:navigation-title: TypoScript |
| 2 | +.. include:: /Includes.rst.txt |
| 3 | +.. _site-management-typoscript: |
| 4 | + |
| 5 | +=================================== |
| 6 | +TypoScript module (Site management) |
| 7 | +=================================== |
| 8 | + |
| 9 | +The TypoScript backend module can be used to debug the TypoScript configuration |
| 10 | +that you provided via your site as described in |
| 11 | +:ref:`"Hello world" example in TypoScript <t3start:typoscript-hello-world>` |
| 12 | +or via your site set as described in the Site Package Tutorial, chapter |
| 13 | +:ref:`The TypoScript-only version <t3sitepackage:make-typoscript-available>`. |
| 14 | + |
| 15 | +Before TYPO3 v13 TypoScript was managed via database records, called "TypoScript |
| 16 | +records". It is still possible doing this and you will see it in older examples |
| 17 | +or installations that have been updated and not refactored. This module can |
| 18 | +also be used to manage TypoScript records. Its usage is described in |
| 19 | +TypoScript Reference, chapter |
| 20 | +:ref:`TypoScript backend module <t3tsref:typoscript-syntax-typoscript-templates-structure>`. |
| 21 | + |
| 22 | +In the context of this guide we concentrate on the new way of providing TypoScript |
| 23 | +via the site only. |
| 24 | + |
| 25 | +The TypoScript module consists of the following submodules. You can switch them |
| 26 | +in the docheader: |
| 27 | + |
| 28 | +.. figure:: /Images/ManualScreenshots/Modules/TypoScript.png |
| 29 | + :alt: Screenshot of the TypoScript module in the backend demonstrating the location of the submodule switch, a drop down in the document header |
| 30 | + |
| 31 | + Switch between the TypoScript submodules in |
| 32 | + |
| 33 | +.. contents:: |
| 34 | + |
| 35 | +.. _site-management-typoscript-overview: |
| 36 | + |
| 37 | +TypoScript Overview |
| 38 | +=================== |
| 39 | + |
| 40 | +Global overview of all pages with active TypoScript definitions (TypoScript |
| 41 | +records and site sets). Useful if you have more then one site or more then one |
| 42 | +TypoScript record in one site. |
| 43 | + |
| 44 | +.. _site-management-typoscript-constant-editor: |
| 45 | + |
| 46 | +Constant Editor |
| 47 | +=============== |
| 48 | + |
| 49 | +Before site settings were introduced with TYPO3 13, TypoScript constants where |
| 50 | +used to define values once and reuse them across TypoScript definitions. |
| 51 | + |
| 52 | +Constants can still be used for backward compatibility reasons but the |
| 53 | +Constant Editor is not available if you are using site sets. Other |
| 54 | +then site settings, TypoScript constants are only available within TypoScript. |
| 55 | + |
| 56 | +It is therefore recommended to always use site settings. |
| 57 | + |
| 58 | +.. _site-management-typoscript-record-editor: |
| 59 | + |
| 60 | +Edit TypoScript record |
| 61 | +====================== |
| 62 | + |
| 63 | +Only available if TypoScript records are being used. Can be used to edit those |
| 64 | +records. As we manage TypoScript within the site in this Guide it is out of |
| 65 | +scope of this Guide. Its usage is described in the TypoScript reference, |
| 66 | +chapter :ref:`Submodule "Edit TypoScript Record" <t3tsref:typoscript_module_edit>`. |
| 67 | + |
| 68 | +.. _site-management-typoscript-active: |
| 69 | + |
| 70 | +Active TypoScript |
| 71 | +================= |
| 72 | + |
| 73 | +This module can be used to debug the active TypoScript. During loading and |
| 74 | +pre compiling TypoScript configuration can override or unset definitions made in |
| 75 | +another file. |
| 76 | + |
| 77 | +How exactly this happens depends on things like dependencies between the used |
| 78 | +site sets. |
| 79 | + |
| 80 | +For example if a site set in your site package configures: |
| 81 | + |
| 82 | +.. code-block:: typoscript |
| 83 | + :caption: EXT:site_package/Configuration/Sets/SitePackage/setup.typoscript |
| 84 | +
|
| 85 | + page.20 = TEXT |
| 86 | + page.20.value = Apple |
| 87 | +
|
| 88 | +And the set of another extensions configures: |
| 89 | + |
| 90 | +.. code-block:: typoscript |
| 91 | + :caption: EXT:some_extension/Configuration/Sets/BananaSet/setup.typoscript |
| 92 | +
|
| 93 | + page.20 = TEXT |
| 94 | + page.20.value = Banana |
| 95 | +
|
| 96 | +It depends on how these sets are loaded weather the `page.20.value` ends up |
| 97 | +being set to "Banana" or "Apple". |
| 98 | + |
| 99 | +If the site set of our site package **depends** on the Banana set, the |
| 100 | +SitePackage set **overrides** the Banana set and the Active TypoScript submodule |
| 101 | +will show you the value "Apple" while it never mentions Banana. |
| 102 | + |
| 103 | +This module therefore shows you the compiled version of the TypoScript. |
| 104 | + |
| 105 | +The module can also be used to simulate what happens if certain |
| 106 | +:ref:`TypoScript Conditions <t3tsref:typoscript-syntax-implementing-custom-conditions>` |
| 107 | +are being met or how site settings / TypoScript constants are replaced. |
| 108 | + |
| 109 | +Chapter :ref:`Debug the TypoScript in the backend module "Active |
| 110 | +TypoScript" <typoscript-active-debug>` demonstrates the usage of this module in |
| 111 | +a concrete example. |
| 112 | + |
| 113 | +.. _site-management-typoscript-included: |
| 114 | + |
| 115 | +Included TypoScript |
| 116 | +=================== |
| 117 | + |
| 118 | +This submodule is helpful in debugging in which order TypoScript files were |
| 119 | +included and :ref:`@import <t3tsref:typoscript-syntax-import>` statements were |
| 120 | +resolved. |
| 121 | + |
| 122 | +If the "Banana" from the example in :ref:`site-management-typoscript-active` |
| 123 | +was overridden, you can use this module to find out where it might have been |
| 124 | +overridden. |
| 125 | + |
| 126 | +This module is also described in the TypoScript reference, chapter |
| 127 | +:ref:`Submodule "Included TypoScript" <t3tsref:typoscript-syntax-typoscript-templates-structure-analyzer>`. |
0 commit comments