Skip to content

Commit

Permalink
Unify header underlining of TypoScript chapter
Browse files Browse the repository at this point in the history
  • Loading branch information
sypets committed Sep 3, 2020
1 parent 71d3264 commit 233284e
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 23 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

.. _typoscript-syntax-typoscript-contexts:

========
Contexts
^^^^^^^^
========

There are two contexts where TypoScript is used: templates, where
TypoScript is used to actually define what will appear in the TYPO3 CMS
Expand Down
10 changes: 6 additions & 4 deletions Documentation/ApiOverview/TypoScriptSyntax/Syntax/Includes.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@

.. _typoscript-syntax-includes:

========
Includes
^^^^^^^^
========

You can also add include-instructions in TypoScript code. Availability
depends on the context, but it works with TypoScript templates, Page
TSconfig and User TSconfig.
Expand Down Expand Up @@ -70,7 +72,7 @@ TypoScript in future.


Alternative, traditional Syntax
"""""""""""""""""""""""""""""""
===============================

A traditional include-instruction will work as well and for example looks like
this:
Expand Down Expand Up @@ -132,7 +134,7 @@ DIR This includes all files from a directory relative to :php:`\TYPO3\CMS\C
.. _typoscript-syntax-includes-conditions:

Conditions
""""""""""
==========

Since TYPO3 CMS 7, it is possible to use conditions on include directives.
The conditions are the same as was presented in the :ref:`previous chapter <typoscript-syntax-conditions>`.
Expand All @@ -159,7 +161,7 @@ Example:
.. _typoscript-syntax-includes-best-practices:

Best practices
""""""""""""""
==============

The option to filter by extension has been included exactly for the
purpose of covering as many use cases as possible. In TYPO3 CMS we often
Expand Down
3 changes: 2 additions & 1 deletion Documentation/ApiOverview/TypoScriptSyntax/Syntax/Index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

.. _typoscript-syntax-syntax:

======
Syntax
------
======

.. toctree::
:maxdepth: 5
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

.. _typoscript-syntax-syntax-introduction:

============
Introduction
^^^^^^^^^^^^
============

TypoScript is internally handled as a (large) multidimensional PHP
array (see ":ref:`typoscript-syntax-what-is-typoscript`"). Values are arranged in a
Expand All @@ -16,7 +17,7 @@ conveys the idea of defining objects/properties.
.. _typoscript-syntax-syntax-example:

Example
"""""""
=======

.. code-block:: typoscript
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@

.. _typoscript-syntax-typoscript-syntax:

=================
TypoScript syntax
^^^^^^^^^^^^^^^^^
=================

TypoScript is parsed in a very simple way; line by line. This means
that abstractly said each line normally contains three parts based on
Expand All @@ -28,7 +29,7 @@ and a value :code:`value 2`.
.. _typoscript-syntax-syntax-object-path:

Object Path
"""""""""""
===========

The object path (in this case :code:`myObject.myProperty`) is like the
variable name in a programming language. The object path is the first
Expand All @@ -54,7 +55,7 @@ Here we do **not** have three hierarchically structured objects :code:`my`,
.. _typoscript-syntax-syntax-operator:

Operator
""""""""
========

The operator (in the example it is :code:`=`) can be one of the characters
:code:`=<>{(`. The various operators are described below.
Expand All @@ -65,7 +66,7 @@ The operator (in the example it is :code:`=`) can be one of the characters
.. _typoscript-syntax-syntax-value-assignment:

Value assignment: The "=" operator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------------

This simply assigns a value to an object path.

Expand All @@ -85,7 +86,7 @@ whitespace at both ends.
.. _typoscript-syntax-syntax-value-modification:

Value modifications: The ":=" operator
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------------------

This operator assigns a value to an object path by calling a
predefined function which modifies the existing value of the current
Expand Down Expand Up @@ -180,7 +181,7 @@ produces the same result as:
.. _typoscript-syntax-syntax-curly-brackets:

Code blocks: The { } signs
~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------

Opening and closing curly braces are used to assign many object
properties in a simple way at once. It's called a block or nesting of
Expand Down Expand Up @@ -238,7 +239,7 @@ could also be written as:
.. _typoscript-syntax-syntax-multiline-values:

Multi-line values: The ( ) signs
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
--------------------------------

Opening and closing parenthesis are used to assign a *multi-line
value* . With this method you can define values which span several
Expand Down Expand Up @@ -275,7 +276,7 @@ it!
.. _typoscript-syntax-syntax-object-copying:

Object copying: The "<" sign
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
----------------------------

The :code:`<` sign is used to copy one object path to another. The whole
object is copied - both value and properties - and it overrides any
Expand Down Expand Up @@ -353,7 +354,7 @@ which – in tree view – translates to:
.. _typoscript-syntax-syntax-object-referencing:

References: the "=<" sign
~~~~~~~~~~~~~~~~~~~~~~~~~
-------------------------

**In the context of TypoScript Templates** it is possible to create
references from one object to another. References mean that multiple
Expand Down Expand Up @@ -407,7 +408,7 @@ Remember:
.. _typoscript-syntax-syntax-unsetting-operator:

Object unsetting: The ">" Sign
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
------------------------------

This is used to unset an object and all of its properties.

Expand All @@ -428,7 +429,7 @@ In this last line :code:`myObject` is totally wiped out (removed).
.. _typoscript-syntax-syntax-conditions:

Conditions: Lines starting with "["
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----------------------------------

Conditions break the parsing of TypoScript in order to evaluate the
content of the condition line. If the evaluation returns true, parsing
Expand Down Expand Up @@ -461,7 +462,7 @@ of any curly braces).
.. _typoscript-syntax-syntax-value:

Value
"""""
=====

The value (in case of the above example "value 2") is whatever characters
follow the operator until the end of the line, but trimmed for whitespace
Expand All @@ -472,13 +473,13 @@ value starts after the operator and ends with the line break.
.. _typoscript-syntax-syntax-comments:

Comments
""""""""
========

TypoScript support single line comments as well as multiline comment blocks.


Single line comments
~~~~~~~~~~~~~~~~~~~~
--------------------

When a line starts with :code:`//` or :code:`#` it is considered to be a comment
and will be ignored.
Expand All @@ -501,7 +502,7 @@ style however is deprecated and should not be used.
.. _typoscript-syntax-syntax-comment-blocks:

Comment blocks
~~~~~~~~~~~~~~
--------------

When a line starts with :code:`/*` or :code:`*/` it defines the beginning or the
end of a comment section respectively. Anything inside a comment
Expand Down

0 comments on commit 233284e

Please sign in to comment.