first good looking code
This commit is contained in:
@@ -13,7 +13,7 @@ call_user_func(function()
|
||||
*/
|
||||
\TYPO3\CMS\Core\Utility\ExtensionManagementUtility::registerPageTSConfigFile(
|
||||
$extensionKey,
|
||||
'Configuration/TsConfig/Page/All.tsconfig',
|
||||
'Configuration/TSconfig/Page/All.tsconfig',
|
||||
'Sitepackage'
|
||||
);
|
||||
});
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# PageTS for Sitepackage
|
||||
#
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/RTE.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/TCEFORM.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/TCEMAIN.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/RTE.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/TCEFORM.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/TCEMAIN.tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:sitepackage/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts.tsconfig">
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#
|
||||
# BACKENDLAYOUTS
|
||||
#
|
||||
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:sitepackage/Configuration/TsConfig/Page/Mod/WebLayout/BackendLayouts" extensions="tsconfig">
|
||||
<INCLUDE_TYPOSCRIPT: source="DIR:EXT:sitepackage/Configuration/TSconfig/Page/Mod/WebLayout/BackendLayouts" extensions="tsconfig">
|
||||
|
||||
@@ -0,0 +1,85 @@
|
||||
|
||||
# ###
|
||||
# basic libs for page setup
|
||||
# ###
|
||||
|
||||
# ###
|
||||
# get page title (fallback to page)
|
||||
# ###
|
||||
|
||||
lib.getHeadline = COA
|
||||
lib.getHeadline {
|
||||
wrap = <div id="headline">|</div>
|
||||
|
||||
# hide headline on specific pages
|
||||
stdWrap.if.isInList.data = page:uid
|
||||
stdWrap.if.value = {$site_package_base.content.getHeadline.hideOnPages}
|
||||
stdWrap.if.negate = 1
|
||||
|
||||
10 < styles.content.get
|
||||
10 {
|
||||
# getting content of colPos = 3
|
||||
select.where = colPos=3
|
||||
|
||||
stdWrap.ifEmpty.cObject = TEXT
|
||||
stdWrap.ifEmpty.cObject {
|
||||
data = page:title
|
||||
wrap = <h1>|</h1>
|
||||
}
|
||||
}
|
||||
|
||||
20 = TEXT
|
||||
20 {
|
||||
data = page:subtitle
|
||||
wrap = <p class="headline-subtitle">|</p>
|
||||
required = 1
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
# get current sys_language
|
||||
lib.getCurrentLanguage = COA
|
||||
lib.getCurrentLanguage {
|
||||
stdWrap.noTrimWrap = | lang-||
|
||||
10 = TEXT
|
||||
10 {
|
||||
# @ToDo: this is currently not working
|
||||
data = siteLanguage:twoLetterIsoCode
|
||||
}
|
||||
}
|
||||
|
||||
# test if current page is front page (= home)
|
||||
lib.isFrontPage = COA
|
||||
lib.isFrontPage {
|
||||
10 = TEXT
|
||||
10 {
|
||||
# classes for !home
|
||||
value = page
|
||||
# classes for home
|
||||
value.override = home
|
||||
value.override.if {
|
||||
equals.data = page:uid
|
||||
value = {$sitepackage.website.rootUid}
|
||||
}
|
||||
|
||||
noTrimWrap = | ||
|
||||
}
|
||||
|
||||
20 < .10
|
||||
20 {
|
||||
# classes for !home
|
||||
value = not-front-page
|
||||
# classes for home
|
||||
value.override = front-page
|
||||
}
|
||||
|
||||
30 < .10
|
||||
30 {
|
||||
# classes for !home
|
||||
value = singular
|
||||
# classes for home
|
||||
value.override = not-singular
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -20,3 +20,26 @@ page {
|
||||
}
|
||||
}
|
||||
|
||||
sitepackage {
|
||||
website {
|
||||
titleDelim = >
|
||||
title = TYPO3-Template
|
||||
rootUid = 1
|
||||
}
|
||||
navigation {
|
||||
main {
|
||||
levels = 3
|
||||
}
|
||||
breadcrumb {
|
||||
hideOnPages =
|
||||
}
|
||||
meta {
|
||||
uidList =
|
||||
includeNotInMenu =
|
||||
}
|
||||
language {
|
||||
languages =
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
EXT:fluid_styled_content/Configuration/TypoScript/,
|
||||
EXT:content_elements/Configuration/TypoScript/
|
||||
@@ -1,9 +1,24 @@
|
||||
# ###
|
||||
# LIB
|
||||
# ###
|
||||
|
||||
@import 'EXT:sitepackage/Configuration/TypoScript/Libs/Libs.typoscript'
|
||||
|
||||
|
||||
##############
|
||||
#### PAGE ####
|
||||
##############
|
||||
page = PAGE
|
||||
page {
|
||||
typeNum = 0
|
||||
|
||||
# set new body tag
|
||||
bodyTag >
|
||||
bodyTagCObject =< lib.bodyTag
|
||||
|
||||
|
||||
includeCSS {
|
||||
theme = EXT:sitepackage/Resources/Public/Stylesheets/styles.css
|
||||
theme = EXT:sitepackage/Resources/Public/StyleSheets/styles.css
|
||||
}
|
||||
|
||||
includeJSLibs {
|
||||
@@ -25,7 +40,7 @@ page {
|
||||
config {
|
||||
# better page title, noPageTitle is not a good idea since most extensions add own title
|
||||
pageTitle {
|
||||
noTrimWrap = || {$site_package_base.website.titleDelim} {$site_package_base.website.title}|
|
||||
noTrimWrap = || {$sitepackage.website.titleDelim} {$sitepackage.website.title}|
|
||||
|
||||
override.cObject = TEXT
|
||||
override.cObject {
|
||||
@@ -40,4 +55,117 @@ page {
|
||||
admPanel = 1
|
||||
}
|
||||
|
||||
|
||||
10 = FLUIDTEMPLATE
|
||||
10 {
|
||||
# template names will be generated automatically by converting the applied
|
||||
# backend_layout, there is no explicit mapping necessary anymore.
|
||||
#
|
||||
# example:
|
||||
# subnavigation_right_2_columns -> SubnavigationRight2Columns.html
|
||||
templateName = TEXT
|
||||
templateName {
|
||||
cObject = TEXT
|
||||
cObject {
|
||||
data = pagelayout
|
||||
required = 1
|
||||
case = uppercamelcase
|
||||
split {
|
||||
token = pagets__
|
||||
cObjNum = 1
|
||||
1.current = 1
|
||||
}
|
||||
}
|
||||
|
||||
ifEmpty = Default
|
||||
}
|
||||
|
||||
layoutRootPaths {
|
||||
10 = EXT:sitepackage/Resources/Private/Layouts/Page/
|
||||
}
|
||||
|
||||
templateRootPaths {
|
||||
10 = EXT:sitepackage/Resources/Private/Templates/Page/
|
||||
}
|
||||
|
||||
partialRootPaths {
|
||||
10 = EXT:sitepackage/Resources/Private/Partials/Page/
|
||||
}
|
||||
|
||||
|
||||
# can be accessed directly within the layouts/ templates/ partials via {settings.myVariable}
|
||||
settings {
|
||||
|
||||
}
|
||||
|
||||
variables {
|
||||
rootPage = TEXT
|
||||
rootPage.data = leveluid:0
|
||||
|
||||
content < styles.content.get
|
||||
|
||||
main-content< styles.content.get
|
||||
main-content.select.where = colPos=0
|
||||
|
||||
marginal-content < styles.content.get
|
||||
marginal-content.select.where = colPos=1
|
||||
|
||||
footer-content < styles.content.get
|
||||
footer-content.select.where = colPos=200
|
||||
footer-content.slide = -1
|
||||
|
||||
# breadcrumbSingleRecordEntry is used to extend the breadcrumb path
|
||||
# it allows us to display the title of a single record (like tx_news detail page)
|
||||
breadcrumbSingleRecordEntry = COA
|
||||
breadcrumbSingleRecordEntry {
|
||||
}
|
||||
}
|
||||
|
||||
# data processors for navigation
|
||||
dataProcessing {
|
||||
# main navigation
|
||||
10 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
10 {
|
||||
# right now, 3 levels are supported
|
||||
levels = {$sitepackage.navigation.main.levels}
|
||||
as = navigationMain
|
||||
expandAll = 1
|
||||
}
|
||||
|
||||
# breadcrumb
|
||||
20 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
20 {
|
||||
special = rootline
|
||||
special.range = 0|-1
|
||||
includeNotInMenu = 1
|
||||
as = breadcrumb
|
||||
|
||||
if {
|
||||
isInList.data = page:uid
|
||||
value = {$sitepackage.navigation.breadcrumb.hideOnPages}
|
||||
negate = 1
|
||||
}
|
||||
}
|
||||
|
||||
# meta navigation
|
||||
30 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
30 {
|
||||
special = {$sitepackage.navigation.meta.type}
|
||||
special.value = {$sitepackage.navigation.meta.uidList}
|
||||
includeNotInMenu = {$sitepackage.navigation.meta.includeNotInMenu}
|
||||
as = navigationMeta
|
||||
if {
|
||||
isTrue = {$sitepackage.navigation.meta.uidList}
|
||||
}
|
||||
}
|
||||
|
||||
# language navigation
|
||||
40 = TYPO3\CMS\Frontend\DataProcessing\LanguageMenuProcessor
|
||||
40 {
|
||||
languages = {$sitepackage.navigation.language.languages}
|
||||
as = navigationLanguage
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user