Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions Classes/ServiceProvider.php
Original file line number Diff line number Diff line change
Expand Up @@ -187,6 +187,13 @@ public static function getContentBlockTypoScript(ContainerInterface $container):
if (!file_exists($absolutePath)) {
continue;
}

$importStatement = '';
if (file_exists(GeneralUtility::getFileAbsFileName($extPath . '/setup.typoscript'))) {
$importStatement = '@import "' . $extPath . '/setup.typoscript"';
}


$typoScript = <<<HEREDOC
tt_content.{$typeDefinition->getTypeName()} =< lib.contentBlock
tt_content.{$typeDefinition->getTypeName()} {
Expand All @@ -198,6 +205,7 @@ public static function getContentBlockTypoScript(ContainerInterface $container):
20 = $extPrivatePath/layouts/
}
}
$importStatement
HEREDOC;
$arrayObject->append($typoScript);
}
Expand Down
19 changes: 19 additions & 0 deletions Documentation/ChangeLog/1.4/Index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
.. include:: /Includes.rst.txt
.. _changelog-1.4:

===
1.4
===

.. contents::

Features
========

Autoload TypoScript
-------------------

It is now possible to provide a :file:`setup.typoscript` for each content block.
This file is loaded out of the box.
This can be used to provide necessary TypoScript like applying data processing for the
content block.