Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

add a space char in Typoscript

I would like to add a blank/whitespace in TypoScript It concerne a "More"-link in tt_news.

Here's the HTML I have :

<p class="bodytext">blablabla<span class="news-list-morelink">&nbsp;<a title="Read all the news" target="_top" href="http://www.google.com">More</a></span></p>

And here's what I want :

<p class="bodytext">blablabla <span class="news-list-morelink">&nbsp;<a title="Read all the news" target="_top" href="http://www.google.com">More</a></span></p>

(the difference is the whitespace juste before the <span>.

In my opinion, I must make a change in the TypoScript which generates the link "more". That must be where I wrote "HERE"

plugin.tt_news {
 displayLatest{
  subheader_stdWrap {
   #More link after the bodytext
   append = TEXT
   append.data = register:newsMoreLink
   append.wrap = HERE<span class="news-list-morelink">&nbsp;|</span>
  }
 }
}

Does anyone have an idea ? Thanks...

like image 249
alienlebarge Avatar asked Nov 05 '10 14:11

alienlebarge


2 Answers

Use noTrimWrap instead of wrap:

append.noTrimWrap = | <span class="news-list-morelink">&nbsp;|</span>|

See TSref chapter 5, search for noTrimWrap.

like image 138
norwebian Avatar answered Nov 02 '22 06:11

norwebian


My solution was to add:

NO.afterWrap = &#32
like image 1
Matevz Avatar answered Nov 02 '22 04:11

Matevz