[TYPO3-english] Fluidtemplates not showed.
Thomas Petersen
tp at codem.dk
Sat Sep 21 23:14:56 CEST 2013
Hi
Im new to this TYPO3 world, with Fluid.
My problem is that i have some templates and have added a backend template.
When i use "Page" and add a template for it, I see the layout and can add text, but when i then see the page in "View" or live page its dont show the text.
I have a main page (in layout folder) where i have.
<f:render section="content" />
Then i have a threerow.html
<f:layout name="main" />
<f:section name="content">
<div class="container">
<section id="top">
<div class="top_inner">
<f:format.html>{content_top}</f:format.html>
</div>
</section>
<section id="middle">
<div class="middle_inner">
<section id="middle_content">
<div class="entry">
<f:format.html>{content_middle}</f:format.html>
</div>
</section>
</div>
</section>
<section id="bottom">
<div class="bottom_inner">
<f:format.html>{content_bottom}</f:format.html>
</div>
</section>
</div>
</f:section>
I then have a backend template "threeRowTemplate"
backend_layout {
colCount = 1
rowCount = 3
rows {
1 {
columns {
1 {
name = toprow
colPos = 3
}
}
}
2 {
columns {
1 {
name = middlerow
colPos = 0
}
}
}
3 {
columns {
1 {
name = bottomrow
colPos = 4
}
}
}
}
}
then i have some TS code.....
# Create a Fluid Template
page.10 = FLUIDTEMPLATE
page.10 {
# Set the Template Pathes
file = fileadmin/templates/layouts/main.html
parialRootPath = fileadmin/templates/partials/
layoutRootPath = fileadmin/templates/layouts/
variables {
# Assign the main column with our {content}-destination
content < styles.content.get
# Assign the left column with our {content_left}-destination
content_left < styles.content.get
content_left.select.where = colPos = 1
# Assign the right column with our {content_right}-destination
content_right < styles.content.get
content_right.select.where = colPos = 2
# Assign the top row with our {content_top}-destination
content_top < styles.content.get
content_top.select.where = colPos = 3
# Assign the bottomrow with our {content_bottom}-destination
content_bottom < styles.content.get
content_bottom.select.where = colPos = 4
}
}
# Assign the Template files with the Fluid Backend-Template | Remember ID's
page.10.file.stdWrap.cObject = CASE
page.10.file.stdWrap.cObject {
key.data = levelfield:-1, backend_layout_next_level, slide
key.override.field = backend_layout
# Set the default Template, our 2 row Template
default = TEXT
default.value = fileadmin/templates/twoRow.html
# Set also the 1. [2] Template, our 3 column Template
3 = TEXT
3.value = fileadmin/templates/threeColumn.html
# Set a 2. [3] Template, our full size Template
4 = TEXT
4.value = fileadmin/templates/fullSize.html
# Set a 3. [4] Template, our 3 row Template
5 = TEXT
5.value = fileadmin/templates/threeRow.html
# Set a 4. [5] Template, our 2 row Template
6 = TEXT
6.value = fileadmin/templates/twoRow.html
}
Now if a make a page and add the frontend and backend layout/template threeRowTemplate.
Then i can in online page see the code.
If i then add something to the top row/middle row and bottom row i see it on the "page" added as content.
If i then run the page nothing is showed, only my template layout, its not showing the text added as content, if i look at sourcecode in browser its the same, i only see something like this, where the code is blank at "CONTENT MISSING" and i have added some text to it.
whats wrong ?
<div class="container">
<section id="top">
<div class="top_inner">
CONTENT MISSING
</div>
</section>
<section id="middle">
<div class="middle_inner">
<section id="middle_content">
<div class="entry">
CONTENT MISSING
</div>
</section>
</div>
</section>
<section id="bottom">
<div class="bottom_inner">
CONTENT MISSING
</div>
</section>
</div>
More information about the TYPO3-english
mailing list