Skip to content
Snippets Groups Projects
Commit 3307a5db authored by Josef Glatz's avatar Josef Glatz Committed by Markus Klein
Browse files

[BUGFIX] Make styles.content.get available after major FSC rewrite

Since the major rewrite of EXT:fluid_styled_content and
EXT:css_styled_content the following TypoScript setup must
be loaded by default:

* `styles.content.get` can be used as ready2use `CONTENT`
  object for `colPos = 0`
* `tt_content.default` outputs necessary info in the frontend,
  if the CType has currently no rendering definition

Both can be used independently from FSC or CSC.

Including the necessary TypoScript via `addTypoScriptSetup()`
takes care of loading it before any other activated extension.

Resolves: #80044
Related: #79622
Releases: master
Change-Id: I460ed9f57e215be96ee13d6714cd522882fb53eb
Reviewed-on: https://review.typo3.org/51884


Tested-by: default avatarTYPO3com <no-reply@typo3.com>
Tested-by: default avatarDaniel Goerz <ervaude@gmail.com>
Reviewed-by: default avatarJohannes Kasberger <johannes.kasberger@reelworx.at>
Tested-by: default avatarJohannes Kasberger <johannes.kasberger@reelworx.at>
Tested-by: default avatarDaniela Grammlich <grammlich@punkt.de>
Reviewed-by: default avatarMarkus Klein <markus.klein@typo3.org>
Tested-by: default avatarMarkus Klein <markus.klein@typo3.org>
parent f51ce1a4
No related merge requests found
......@@ -45,6 +45,36 @@ $GLOBALS['TYPO3_CONF_VARS']['FE']['eID_include']['tx_cms_showpic'] = \TYPO3\CMS\
options.disableDelete.sys_file = 1
');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addTypoScriptSetup(
'
# Content selection
styles.content.get = CONTENT
styles.content.get {
table = tt_content
select {
orderBy = sorting
where = colPos=0
}
}
# Content element rendering
tt_content = CASE
tt_content {
key {
field = CType
}
default = TEXT
default {
field = CType
htmlSpecialChars = 1
wrap = <p style="background-color: yellow; padding: 0.5em 1em;"><strong>ERROR:</strong> Content Element with uid "{field:uid}" and type "|" has no rendering definition!</p>
wrap.insertData = 1
}
}
'
);
// Registering hooks for the tree list cache
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processDatamapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_tcemain.php']['processCmdmapClass'][] = \TYPO3\CMS\Frontend\Hooks\TreelistCacheUpdateHooks::class;
......
# Content selection
styles.content.get = CONTENT
styles.content.get {
table = tt_content
select {
orderBy = sorting
where = colPos=0
}
}
# Content element rendering
tt_content = CASE
tt_content {
key {
field = CType
}
default = TEXT
default {
field = CType
htmlSpecialChars = 1
wrap = <p style="background-color: yellow; padding: 0.5em 1em;"><strong>ERROR:</strong> Content Element with uid "{field:uid}" and type "|" has no rendering definition!</p>
wrap.insertData = 1
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment