Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
ttree
News
Commits
248b0352
Commit
248b0352
authored
Jan 27, 2015
by
Dominique Feyer
Browse files
[TASK] Remove HTML from TS object
Now all HTML content are located in Fluid templates
parent
6db2abad
Changes
5
Hide whitespace changes
Inline
Side-by-side
Resources/Private/Templates/List.html
View file @
248b0352
...
...
@@ -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
Resources/Private/Templates/NewsShort.html
View file @
248b0352
...
...
@@ -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}"
>
R
ead
m
ore
</a>
<a
class=
"
link-text
list-more-link"
href=
"{uri}"
>
{r
ead
M
ore
Label}
</a>
</div>
</f:if>
</article>
\ No newline at end of file
Resources/Private/TypoScript/NodeTypes/AbstractList.ts2
View file @
248b0352
...
...
@@ -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'
...
...
Resources/Private/TypoScript/NodeTypes/AbstractNews.ts2
View file @
248b0352
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}
...
...
Resources/Private/TypoScript/NodeTypes/NewsShort.ts2
View file @
248b0352
...
...
@@ -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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment