-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add a two column layout to test PageLayout
- Loading branch information
Alexander Opitz
committed
Jun 7, 2021
1 parent
4311c8d
commit a633a77
Showing
3 changed files
with
197 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
<?xml version="1.0" encoding="utf-8" standalone="yes" ?> | ||
<T3DataStructure> | ||
<meta type="array"> | ||
<title>Two Column Page</title> | ||
<description>Place a description here</description> | ||
</meta> | ||
<ROOT type="array"> | ||
<el type="array"> | ||
<field_content_col1 type="array"> | ||
<TCEforms type="array"> | ||
<label>Left Column</label> | ||
<config type="array"> | ||
<type>group</type> | ||
<internal_type>db</internal_type> | ||
<allowed>tt_content</allowed> | ||
<size>5</size> | ||
<maxitems>200</maxitems> | ||
<minitems>0</minitems> | ||
<multiple>1</multiple> | ||
<show_thumbs>1</show_thumbs> | ||
</config> | ||
</TCEforms> | ||
</field_content_col1> | ||
<field_content_col2 type="array"> | ||
<TCEforms type="array"> | ||
<label>Right Column</label> | ||
<config type="array"> | ||
<type>group</type> | ||
<internal_type>db</internal_type> | ||
<allowed>tt_content</allowed> | ||
<size>5</size> | ||
<maxitems>200</maxitems> | ||
<minitems>0</minitems> | ||
<multiple>1</multiple> | ||
<show_thumbs>1</show_thumbs> | ||
</config> | ||
</TCEforms> | ||
</field_content_col2> | ||
</el> | ||
</ROOT> | ||
</T3DataStructure> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,91 @@ | ||
tvp-mapping: | ||
meta: | ||
name: Two column Demo Page | ||
combinedDataStructureIdentifier: 'EM\TVP\Theme\Demo\Page\DataStructure:TwoColumn.tvp.xml' | ||
combinedTemplateConfigurationIdentifier: 'EM\TVP\Theme\Demo\Page\Template:TwoColumn.tvp.yaml' | ||
mappingToTemplate: | ||
field_logo: | ||
value: '' #This is default and do not need to be set | ||
dataType: row | ||
dataPath: media | ||
valueProcessing: typoScript | ||
valueProcessing.typoScript: | # YAML Multiline See: https://yaml-multiline.info/ | ||
10 = FILES | ||
10 { | ||
references { | ||
table = pages | ||
uid.cObject = COA | ||
uid.cObject { | ||
10 = TEXT | ||
10 { | ||
data = page:uid | ||
if.isTrue.data = page:_LOCALIZED_UID | ||
if.negate = 1 | ||
} | ||
20 = TEXT | ||
20 { | ||
data = page:_LOCALIZED_UID | ||
if.isTrue.data = page:_LOCALIZED_UID | ||
} | ||
} | ||
fieldName = media | ||
} | ||
renderObj = COA | ||
renderObj { | ||
10 = IMAGE | ||
10 { | ||
file { | ||
treatIdAsReference = 1 | ||
import.data = file:current:uid | ||
} | ||
altText.data = file:current:alternative | ||
titleText.data = file:current:title | ||
params = class="img-fluid" | ||
} | ||
} | ||
} | ||
field_title: | ||
dataType: row | ||
dataPath: title | ||
valueProcessing: stdWrap | ||
valueProcessing.stdWrap: '' | ||
field_author: | ||
dataType: row | ||
dataPath: author | ||
valueProcessing: none #This is default and do not need to be set | ||
field_layout: | ||
dataType: row | ||
dataPath: layout | ||
field_content_col1: | ||
dataType: flexform | ||
dataPath: field_content_col1 | ||
valueProcessing: typoScript | ||
valueProcessing.typoScript: | | ||
10 = RECORDS | ||
10.source.current = 1 | ||
10.tables = tt_content | ||
10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end--> | ||
field_content_col2: | ||
dataType: flexform | ||
dataPath: field_content_col2 | ||
valueProcessing: typoScript | ||
valueProcessing.typoScript: | | ||
10 = RECORDS | ||
10.source.current = 1 | ||
10.tables = tt_content | ||
10.wrap = <!--TYPO3SEARCH_begin--> | <!--TYPO3SEARCH_end--> | ||
field_menu: | ||
dataType: typoscriptObjectPath | ||
dataPath: lib.textmenu | ||
field_copyright: | ||
valueProcessing: typoScript | ||
valueProcessing.typoScript: | | ||
10 = TEXT | ||
10 { | ||
data = date : U | ||
strftime = %Y | ||
noTrimWrap = |© TV+ Website | | | ||
} | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
tvp-template: | ||
meta: | ||
name: Default Demo Page | ||
renderer: 'TVP\Renderer\XPath' | ||
template: '../Files/PageWithContent.html' | ||
header: | ||
meta: | ||
description: | ||
content: The description | ||
css: | ||
bootstrap: | ||
href: EXT:em_tvplus_theme_demo/Resources/Public/Css/bootstrap.css | ||
rel: stylesheet | ||
media: all | ||
javascript: | ||
bootstrap: | ||
src: EXT:em_tvplus_theme_demo/Resources/Public/Javascript/bootstrap.js | ||
mapping: | ||
# This is a demonstration what works and I hope it is a bit self explaining | ||
# Till yet this isn't set in stone and may change in naming and working | ||
# For example OUTER/INNER/ATTRIB are old names but a bit hard to understand | ||
xpath: body[1] | ||
mappingType: outer # This shouldn't be readed as mappingType, as it doesn't map something, this should more read | ||
# as "Take the matched element into account or only its childs", so this needs a naming fix | ||
# renderType? | ||
container: | ||
field_logo: | ||
xpath: "//*[@id='logo']" # Example usage of a complex XPath but, bear in mind this variant is slow! | ||
# Normally you shouldn't use the "//" global path. | ||
mappingType: inner | ||
valueType: html # Defines if the content from the value should be represented as plain string | ||
# and added as TEXTNode or handle as HTMLNodes to be added to the DOM tree. | ||
# a.k.a. HtmlSpecialChar | ||
field_menu: | ||
xpath: header/nav/div | ||
mappingType: inner | ||
valueType: html | ||
field_title: | ||
xpath: main/section/div/h1 | ||
mappingType: inner | ||
valueType: plain | ||
field_layout: | ||
xpath: main/section/div/h1 | ||
mappingType: attrib | ||
attribName: class | ||
field_content_col1: | ||
xpath: main/section[3] | ||
mappingType: outer | ||
valueType: html | ||
field_content_col2: | ||
xpath: main/section[3] | ||
mappingType: outer | ||
valueType: html | ||
field_nothing1: | ||
xpath: main/section[4] | ||
mappingType: outer | ||
valueType: html | ||
field_author: | ||
xpath: footer/div/p/span | ||
mappingType: inner | ||
valueType: plain | ||
field_copyright: | ||
xpath: footer/div/p | ||
mappingType: inner | ||
valueType: html |