Skip to content

Commit

Permalink
[TASK] Update introduction (#1448)
Browse files Browse the repository at this point in the history
Releases: main, 13.4, 12.4

Co-authored-by: lina.wolf <[email protected]>
  • Loading branch information
github-actions[bot] and linawolf committed Nov 24, 2024
1 parent 39663f4 commit bcb51e5
Showing 1 changed file with 41 additions and 81 deletions.
122 changes: 41 additions & 81 deletions Documentation/Introduction/Index.rst
Original file line number Diff line number Diff line change
@@ -1,104 +1,64 @@
:navigation-title: Introduction
.. include:: /Includes.rst.txt
.. _typoscript-syntax-typoscript-templates:
.. _typoscript-syntax-typoscript-templates-usage:
.. _introduction:

.. _about:
.. _introduction:
.. _typoscript-syntax-typoscript-templates:
============================
Introduction into TypoScript
============================

============
Introduction
============
TypoScript is a configuration language used to configure both the frontend
output and the backend of a a TYPO3 web site.

What is to be rendered on a page in the frontend,
the menu structure, how content objects are displayed, etc. can be
defined with TypoScript - often it is used in
combination with the Fluid templating engine.
TypoScript is not a programming language but a means of configuring the
website.

This document is a **reference**, used to lookup TypoScript templating
:ref:`basic data types <data-types>`, :ref:`object types <cobject>`,
:ref:`functions <functions>` and :ref:`conditions <conditions>`. This
reference is not intended to give you a full introduction into the topic
TypoScript.
.. contents::

.. _introduction-frontend-typoscript:

What is TypoScript?
Frontend TypoScript
===================

TypoScript can have 2 meanings:
Frontend TypoScript is mainly used to configure which data should be send to the
Fluid templates.

* **TypoScript syntax** is used in TypoScript templates and in
TSconfig
* **TypoScript templates** are used to configure
the TYPO3 frontend rendering.
It can also be used to define settings send to Extbase plugins, metadata for
a whole page etc.

Additionally, in TypoScript templates, you must differentiate between
In the beginning of TYPO3, TypoScript was used as templating language. In modern
project it is not common to do that anymore.

* TypoScript **constants** (using the TypoScript constant syntax)
* and Typoscript **setup**
For an introduction see
`Getting started: A quick introduction into TypoScript <https://docs.typo3.org/permalink/t3tsref:guide>`_.

Though TypoScript does include "functions" and "objects" and "conditions"
it is not a programming language. Think of it more as a configuration
language. The results of the TypoScript setup are used to build a PHP
array.
.. _about-tsconfig:

Basically think of TypoScript as a means to "configure" the **frontend**,
while TSconfig is used to configure the **backend** (with a few exceptions
to this principle)
Backend TypoScript / TSconfig
=============================

Please read the following for an introduction:
Backend TypoScript, also called TSconfig, can be used to configure the output
of certain forms etc in the TYPO3 backend.

* :ref:`TypoScript Syntax <typoscript-syntax>`
chapter for an introduction to the TypoScript
syntax
* :ref:`guide` for an introduction to TypoScript configuration
* The chapter :ref:`using-and-setting` describes how to use, set
and extend TypoScript.
.. _about-page-tsconfig:

Page TSconfig
-------------

.. _typoscript-syntax-typoscript-templates-usage:
Page TSconfig can be made available globally, on a per site or per page level.

Templating methods in TYPO3
===========================
For the possibilities see the
`Page TSconfig Reference <https://docs.typo3.org/permalink/t3tsref:pagetoplevelobjects>`_.

.. _about-user-tsconfig:

TypoScript templates are used to drive frontend rendering.
User TSconfig
-------------

A minimal amount of TypoScript will *always* be necessary to
tell TYPO3 CMS which templating method to use.
It could be any of the following.

Best practice:

- **Fluid templates:** Configure TYPO3 to use `Fluid <https://typo3.org/fluid>`__
for templating. This allows to use external HTML templates, but
with fluid-style variables with curly braces. A content object type
:ref:`cobj-fluidtemplate` is available, which uses Fluid
from inside TypoScript.

* See :ref:`t3sitepackage:start` for a complete walkthrough of creating a
sitepackage, which is the basis for a custom theme for your site.
* See :ref:`t3coreapi:adding-your-own-content-elements` for an
introduction on how to create your own content element types using
TypoScript :ref:`cobj-template`, Fluid and data processors.

Other methods:


- **External Templating Engines:** Any other templating system can be
used. It will be provided via an extension. In such a case TypoScript
may be used to delegate the rendering to that system.

- **Custom PHP:** Configure TYPO3 to call your own PHP code which
generates content in any way you may prefer. This might include using
third party templating engines!

- **TS content objects:** Build the page entirely using TypoScript
content objects. All these objects are highly configurable.

Outdated methods:


- **HTML templates:** Configure TYPO3 CMS to facilitate external HTML-
templates with markers and subparts using the :ref:`cobj-template`
content object type. This method is considered outdated and no
longer recommended.
User TSconfig can be made available globally for certain user groups or certain
users. It cannot be set for just one site or page. It can however override
:ref:`about-page-tsconfig`.

For the possibilities see the
`User TSconfig reference <https://docs.typo3.org/permalink/t3tsref:usertoplevelobjects>`_.

0 comments on commit bcb51e5

Please sign in to comment.