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 {
|
||||
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
||||
10 {
|
||||
as = compatibleWith
|
||||
selectFields = sys_category.*
|
||||
table = sys_category
|
||||
pidInList = 2
|
||||
|
@ -20,13 +21,18 @@ tt_content.menu_abstract {
|
|||
where.insertData = 1
|
||||
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
||||
orderBy = sorting
|
||||
as = compatibleWith
|
||||
}
|
||||
|
||||
11 < .10
|
||||
11 {
|
||||
where = sys_category_record_mm.uid_foreign = {field:uid} AND sys_category.parent = 1
|
||||
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 {
|
||||
as = topic
|
||||
if {
|
||||
value = 100
|
||||
equals.field = layout
|
||||
|
@ -57,7 +64,6 @@ tt_content.menu_abstract {
|
|||
intval = 1
|
||||
}
|
||||
}
|
||||
as = topic
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -38,23 +38,24 @@ page {
|
|||
dataProcessing {
|
||||
10 = TYPO3\CMS\Frontend\DataProcessing\DatabaseQueryProcessor
|
||||
10 {
|
||||
as = assignedTopics
|
||||
table = sys_category
|
||||
pidInList = 2
|
||||
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 1
|
||||
where.insertData = 1
|
||||
leftjoin = sys_category_record_mm ON sys_category_record_mm.uid_local = sys_category.uid
|
||||
orderBy = count DESC, sys_category.title ASC
|
||||
as = assignedTopics
|
||||
}
|
||||
11 < .10
|
||||
11 {
|
||||
as = compatibleWith
|
||||
where = sys_category_record_mm.uid_foreign = {page:uid} AND sys_category.parent = 2
|
||||
orderBy = sorting
|
||||
as = compatibleWith
|
||||
}
|
||||
|
||||
50 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
50 {
|
||||
as = pageSections
|
||||
special = list
|
||||
special.value.data = page:uid
|
||||
dataProcessing {
|
||||
|
@ -67,29 +68,34 @@ page {
|
|||
orderBy = sorting
|
||||
}
|
||||
}
|
||||
as = pageSections
|
||||
}
|
||||
|
||||
100 < .10
|
||||
100 {
|
||||
as = allTopics
|
||||
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
|
||||
groupBy = sys_category.uid
|
||||
as = allTopics
|
||||
}
|
||||
101 < .100
|
||||
101 {
|
||||
as = allTypo3Compatible
|
||||
where = sys_category.parent = 2 AND sys_category_record_mm.uid_foreign IS NOT NULL
|
||||
orderBy = sorting
|
||||
as = allTypo3Compatible
|
||||
}
|
||||
|
||||
500 = TYPO3\CMS\Frontend\DataProcessing\FilesProcessor
|
||||
500 {
|
||||
as = media
|
||||
references.fieldName = media
|
||||
}
|
||||
|
||||
1000 = TYPO3\CMS\Frontend\DataProcessing\MenuProcessor
|
||||
1000 {
|
||||
as = footerMenu
|
||||
special = list
|
||||
special.value = 3
|
||||
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()}
|
||||
|
||||
<f:if condition="{page.media.0}">
|
||||
{f:render(partial: 'Image', arguments: {image: page.media.0})}
|
||||
</f:if>
|
||||
|
||||
<footer>
|
||||
<p><a href="{page.link}">Read more …</a></p>
|
||||
</footer>
|
||||
|
|
|
@ -5,10 +5,7 @@
|
|||
|
||||
<f:section name="Content">
|
||||
<f:for each="{images}" as="image">
|
||||
<figure>
|
||||
<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:render(partial: 'Image', arguments: {image: image})}
|
||||
</f:for>
|
||||
</f:section>
|
||||
</html>
|
||||
|
|
|
@ -20,6 +20,10 @@
|
|||
{data.abstract -> f:format.html()}
|
||||
{introduction -> f:format.raw()}
|
||||
|
||||
<f:if condition="{media.0}">
|
||||
{f:render(partial: 'Image', arguments: {image: media.0})}
|
||||
</f:if>
|
||||
|
||||
{contentMain -> f:format.raw()}
|
||||
|
||||
<f:if condition="{acknowledgements}">
|
||||
|
|
Loading…
Reference in a new issue