Commit 248b0352 authored by Dominique Feyer's avatar Dominique Feyer
Browse files

[TASK] Remove HTML from TS object

Now all HTML content are located in Fluid templates
parent 6db2abad
......@@ -21,7 +21,9 @@
<typo3cr:widget.paginate nodes="{newsCollection}" as="paginatedNewsItems" widgetId="news" configuration="{paginateConfiguration}">
<ul{attributes -> f:format.raw()}>
<f:for each="{paginatedNewsItems}" as="news">
<ts:render path="itemRenderer" context="{node: news}" />
<li class="list-item">
<ts:render path="itemRenderer" context="{node: news}" />
</li>
</f:for>
</ul>
</typo3cr:widget.paginate>
......@@ -30,7 +32,9 @@
<f:section name="List">
<ul{attributes -> f:format.raw()}>
<f:for each="{newsCollection}" as="news">
<ts:render path="itemRenderer" context="{node: news}" />
<li class="list-item">
<ts:render path="itemRenderer" context="{node: news}" />
</li>
</f:for>
</ul>
</f:section>
\ No newline at end of file
......@@ -2,12 +2,12 @@
{namespace neos=TYPO3\Neos\ViewHelpers}
<article>
<header>
{title -> f:format.raw()}
<h2>{title -> f:format.raw()}</h2>
</header>
{preview -> f:format.raw()}
<p>{preview -> f:format.raw()}</p>
<f:if condition="showMoreLink">
<div class="list-more-link-container">
<a class="list-more-link" href="{uri}">Read more</a>
<a class="link-text list-more-link" href="{uri}">{readMoreLabel}</a>
</div>
</f:if>
</article>
\ No newline at end of file
......@@ -24,7 +24,6 @@ prototype(Ttree.News:AbstractList) < prototype(TYPO3.Neos:Content) {
}
itemRenderer = Ttree.News:NewsShort
itemRenderer.@process.wrap = ${'<li class="list-item">' + value + '</li>'}
@cache {
mode = 'cached'
......
prototype(Ttree.News:AbstractNews) < prototype(TYPO3.Neos:Content) {
title = ${q(node).property('title')}
title.@process.wrap = ${'<h2>' + value + '</h2>'}
teaser = ${q(node).property('teaser')}
@override.firstContentNode = ${q(node).children('main').find('[instanceof TYPO3.Neos.NodeTypes:Text]').get(0)}
......@@ -11,7 +10,6 @@ prototype(Ttree.News:AbstractNews) < prototype(TYPO3.Neos:Content) {
category = ${q(node).parents('[instanceof Ttree.News:Category]').get(0)}
preview = ${this.teaser ? this.teaser : q(firstContentNode).property('text')}
preview.@process.wrap = ${'<p>' + value + '</p>'}
uri = TYPO3.Neos:NodeUri {
node = ${node}
......
......@@ -2,7 +2,8 @@ prototype(Ttree.News:NewsShort) < prototype(Ttree.News:AbstractNews) {
templatePath = 'resource://Ttree.News/Private/Templates/NewsShort.html'
title = ${String.stripTags(q(node).property('title'))}
title.@process.wrap = ${'<h2 class="list-header">' + value + '</h2>'}
showMoreLink = TRUE
readMoreLabel = 'Read more'
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment