Add page / blog post images to output
Also move as in dataprocessing always to top, to show it in folded vim.
This commit is contained in:
parent
20c38fe36b
commit
0feb7c46fd
6 changed files with 38 additions and 13 deletions
|
@ -13,6 +13,7 @@ tt_content.menu_abstract {
|
||||||
dataProcessing {
|
dataProcessing {
|
||||||
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
||||||
10 {
|
10 {
|
||||||
|
as = compatibleWith
|
||||||
selectFields = sys_category.*
|
selectFields = sys_category.*
|
||||||
table = sys_category
|
table = sys_category
|
||||||
pidInList = 2
|
pidInList = 2
|
||||||
|
@ -20,13 +21,18 @@ tt_content.menu_abstract {
|
||||||
where.insertData = 1
|
where.insertData = 1
|
||||||
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
||||||
orderBy = sorting
|
orderBy = sorting
|
||||||
as = compatibleWith
|
|
||||||
}
|
}
|
||||||
|
|
||||||
11 < .10
|
11 < .10
|
||||||
11 {
|
11 {
|
||||||
where = sys_category_record_mm.uid_foreign = {field:uid} AND sys_category.parent = 1
|
|
||||||
as = topics
|
as = topics
|
||||||
|
where = sys_category_record_mm.uid_foreign = {field:uid} AND sys_category.parent = 1
|
||||||
|
}
|
||||||
|
|
||||||
|
100 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
|
||||||
|
100 {
|
||||||
|
as = media
|
||||||
|
references.fieldName = media
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -44,6 +50,7 @@ tt_content.menu_abstract {
|
||||||
|
|
||||||
500 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
500 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
||||||
500 {
|
500 {
|
||||||
|
as = topic
|
||||||
if {
|
if {
|
||||||
value = 100
|
value = 100
|
||||||
equals.field = layout
|
equals.field = layout
|
||||||
|
@ -57,7 +64,6 @@ tt_content.menu_abstract {
|
||||||
intval = 1
|
intval = 1
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
as = topic
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,23 +38,24 @@ page {
|
||||||
dataProcessing {
|
dataProcessing {
|
||||||
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
||||||
10 {
|
10 {
|
||||||
|
as = assignedTopics
|
||||||
table = sys_category
|
table = sys_category
|
||||||
pidInList = 2
|
pidInList = 2
|
||||||
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 1
|
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 1
|
||||||
where.insertData = 1
|
where.insertData = 1
|
||||||
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
||||||
orderBy = count DESC, sys_category.title ASC
|
orderBy = count DESC, sys_category.title ASC
|
||||||
as = assignedTopics
|
|
||||||
}
|
}
|
||||||
11 < .10
|
11 < .10
|
||||||
11 {
|
11 {
|
||||||
|
as = compatibleWith
|
||||||
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 2
|
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 2
|
||||||
orderBy = sorting
|
orderBy = sorting
|
||||||
as = compatibleWith
|
|
||||||
}
|
}
|
||||||
|
|
||||||
50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||||
50 {
|
50 {
|
||||||
|
as = pageSections
|
||||||
special = list
|
special = list
|
||||||
special.value.data = page:uid
|
special.value.data = page:uid
|
||||||
dataProcessing {
|
dataProcessing {
|
||||||
|
@ -67,29 +68,34 @@ page {
|
||||||
orderBy = sorting
|
orderBy = sorting
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
as = pageSections
|
|
||||||
}
|
}
|
||||||
|
|
||||||
100 < .10
|
100 < .10
|
||||||
100 {
|
100 {
|
||||||
|
as = allTopics
|
||||||
selectFields = sys_category.*, count(sys_category_record_mm.uid_foreign) as count
|
selectFields = sys_category.*, count(sys_category_record_mm.uid_foreign) as count
|
||||||
where = sys_category.parent = 1 AND sys_category_record_mm.uid_foreign IS NOT NULL
|
where = sys_category.parent = 1 AND sys_category_record_mm.uid_foreign IS NOT NULL
|
||||||
groupBy = sys_category.uid
|
groupBy = sys_category.uid
|
||||||
as = allTopics
|
|
||||||
}
|
}
|
||||||
101 < .100
|
101 < .100
|
||||||
101 {
|
101 {
|
||||||
|
as = allTypo3Compatible
|
||||||
where = sys_category.parent = 2 AND sys_category_record_mm.uid_foreign IS NOT NULL
|
where = sys_category.parent = 2 AND sys_category_record_mm.uid_foreign IS NOT NULL
|
||||||
orderBy = sorting
|
orderBy = sorting
|
||||||
as = allTypo3Compatible
|
}
|
||||||
|
|
||||||
|
500 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
|
||||||
|
500 {
|
||||||
|
as = media
|
||||||
|
references.fieldName = media
|
||||||
}
|
}
|
||||||
|
|
||||||
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||||
1000 {
|
1000 {
|
||||||
|
as = footerMenu
|
||||||
special = list
|
special = list
|
||||||
special.value = 3
|
special.value = 3
|
||||||
levels = 2
|
levels = 2
|
||||||
as = footerMenu
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
8
Resources/Private/Partials/Image.html
Normal file
8
Resources/Private/Partials/Image.html
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<html xmlns:f="http://typo3.org/ns/TYPO3/Fluid/ViewHelpers"
|
||||||
|
data-namespace-typo3-fluid="true">
|
||||||
|
|
||||||
|
<figure>
|
||||||
|
<a href="{f:uri.image(image: image)}" target="_blank"><f:image image="{image}" maxWidth="1015" /></a>
|
||||||
|
<figcaption>Figure i{image.originalFile.uid}: {image.description}</figcaption>
|
||||||
|
</figure>
|
||||||
|
</html>
|
|
@ -10,6 +10,10 @@
|
||||||
|
|
||||||
{page.data.abstract -> f:format.html()}
|
{page.data.abstract -> f:format.html()}
|
||||||
|
|
||||||
|
<f:if condition="{page.media.0}">
|
||||||
|
{f:render(partial: 'Image', arguments: {image: page.media.0})}
|
||||||
|
</f:if>
|
||||||
|
|
||||||
<footer>
|
<footer>
|
||||||
<p><a href="{page.link}">Read more …</a></p>
|
<p><a href="{page.link}">Read more …</a></p>
|
||||||
</footer>
|
</footer>
|
||||||
|
|
|
@ -5,10 +5,7 @@
|
||||||
|
|
||||||
<f:section name="Content">
|
<f:section name="Content">
|
||||||
<f:for each="{images}" as="image">
|
<f:for each="{images}" as="image">
|
||||||
<figure>
|
{f:render(partial: 'Image', arguments: {image: image})}
|
||||||
<a href="{f:uri.image(image: image)}" target="_blank"><f:image image="{image}" maxWidth="1030" /></a>
|
|
||||||
<figcaption>Figure i{image.originalFile.uid}: {image.description}</figcaption>
|
|
||||||
</figure>
|
|
||||||
</f:for>
|
</f:for>
|
||||||
</f:section>
|
</f:section>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -20,6 +20,10 @@
|
||||||
{data.abstract -> f:format.html()}
|
{data.abstract -> f:format.html()}
|
||||||
{introduction -> f:format.raw()}
|
{introduction -> f:format.raw()}
|
||||||
|
|
||||||
|
<f:if condition="{media.0}">
|
||||||
|
{f:render(partial: 'Image', arguments: {image: media.0})}
|
||||||
|
</f:if>
|
||||||
|
|
||||||
{contentMain -> f:format.raw()}
|
{contentMain -> f:format.raw()}
|
||||||
|
|
||||||
<f:if condition="{acknowledgements}">
|
<f:if condition="{acknowledgements}">
|
||||||
|
|
Loading…
Reference in a new issue