Typoscript
rsyslayout_bootstrap: Typoscript
Die Extension bietet - analog zur Extension specialty - einige Typoscript Konfigurationen die automatisch geladen werden.
TsConfig für User und Page
Einige User settings in Configuration/TsConfig/User/config.ts:
###################################################
# Include all TypoScript files
###################################################
options {
# RTE
RTESmallHeight = 800
RTESmallWidth = 800
# cache
clearCache.pages = 1
clearCache.all = 1
# save new
saveDocNew = 1
saveDocNew.tt_content = 1
saveDocNew.pages = 1
# page tree option
pageTree {
# only if checked "Ist Anfang der Web-Site"
showDomainNameWithTitle = 1
# pid
showPageIdWithTitle = 1
}
# Makes sure the clipboard doesn't clear:
saveClipboard = 0
# Reduces the amount of clipboards from 4 to 1:
clipboardNumberPads = 1
}
admPanel {
enable.edit = 1
# Force re-loading the cache for external TS
override.tsdebug.forceTemplateParsing = 1
}
# Default User value
# @doc typo3.org/documentation/document-library/core-documentation/doc_core_tsconfig/4.7.0/view/1/3/
setup.defaults {
titleLen = 80
thumbnailsByDefault = 1
edit_RTE = 1
copyLevels = 10
recursiveDelete = 10
noOnChangeAlertInTypeFields = 0
navFrameWidth = 150
startModule = web_list
}
# Overridden User value
setup.override {
startModule = list
}
# snippets.typo3.org/c/10/
mod.web_list {
hideTables=static_template,static_countries,static_country_zones,static_currencies,static_languages,static_territories,static_taxes,static_markets
itemsLimitSingleTable = 1000
itemsLimitPerTable = 50
}
# show new pages hidden or not
TCAdefaults.pages.hidden = 0
Einige Page settings in Configuration/TsConfig/Page/config.ts:
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:rsyslayout_bootstrap/Configuration/TsConfig/Page/rte.ts">
mod.SHARED {
defaultLanguageFlag = de.gif
defaultLanguageLabel = Deutsch
}
# PAGE DEFAULT PERMISSIONS
TCEMAIN.permissions {
# Configure default permission for new created pages.
# do anything (default):
user = show,editcontent,edit,delete,new
# do anything (normally "delete" is disabled)
group = show,editcontent,edit,delete,new
# (normally everybody can do nothing)
everybody =
# user: default user
# userid = 6
# group _Users
groupid = 1
}
// Full screen for bodytext (tt_content)
TCEFORM.tt_content.bodytext.RTEfullScreenWidth= 100%
TCEFORM.tt_content.layout.altLabels {
1 = Lightbox
2 = Grey
}
TCEMAIN.table.tt_content {
disablePrependAtCopy = 1
disableHideAtCopy = 0
}
TCEFORM.pages{
# remove "Frontend Layout" and "Backend Layout"
layout.disabled = 1
backend_layout.disabled = 1
backend_layout_next_level.disabled = 1
newUntil.disabled = 1
}
Geladen wird das ganze durch folgenden Code in der ext_tables.php:
// Add page TSConfig
$pageTsConfig = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TsConfig/Page/config.ts');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addPageTSConfig($pageTsConfig);
// Add user TSConfig
$userTsConfig = \TYPO3\CMS\Core\Utility\GeneralUtility::getUrl(
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . 'Configuration/TsConfig/User/config.ts');
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addUserTSConfig($userTsConfig);
Backend User
Einige Anpassungen für Backend User in Configuration/TCA/BeUsers.php:
<?php
// Configure BeUsers
# @todo adjust compatibility TYPO3 6.1
# * TCA files should now be located at ext:extensionname/Configuration/TCA/tablename.php' and should return
# an array with the TCA for the table specified by the filename.
# Allows BE User to be put on different page as pid = 0
\TYPO3\CMS\Core\Utility\GeneralUtility::loadTCA('be_users');
$TCA['be_users']['ctrl']['rootLevel'] = -1;
?>
Geladen wird das ganze durch folgendem Code in der ext_tables.php:
/*
* Include custom TCA
* @todo adjust compatibility TYPO3 6.1
*/
$recordTypes = array('BeUsers');
$configurationPath = \TYPO3\CMS\Core\Utility\ExtensionManagementUtility::extPath($_EXTKEY) . '/Configuration/TCA';
foreach ($recordTypes as $recordType) {
$configurationFile = $configurationPath . '/' . $recordType . '.php';
if (file_exists($configurationFile)) {
include_once ($configurationFile);
}
}
Standard Typoscript
Allgemeines Typoscript steht in TypoScript/Settings/constants.txt und TypoScript/Settings/setup.txt. Das wird geladen wie üblich mit folgendem Code in der ext_tables.php und inkludieren im Root TS Template:
// TS Template
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::addStaticFile($_EXTKEY, 'Configuration/TypoScript', 'rsyslayout_bootstrap');