[TYPO3-english] Preserve spaces in wrap

Christopher Torgalson bedlamhotel at gmail.com
Mon Aug 16 18:34:04 CEST 2010


Hi,

On Mon, Aug 16, 2010 at 9:20 AM, Victor Livakovsky <v-tyok at mail.ru> wrote:
> Hi, List.
>
> As documentation says: even though there are spaces between the wrap-parts
> and the divider ("|"), each wrap part is trimmed.
> Is there any way to preserve a spaces?
>
> We have such structure for fetching css class-name, that is stored in a
> 'Page'.
> lib.main_menu.1 {
>  NO.ATagParams.cObject = TEXT
>  NO.ATagParams.wrap = class="|"
>  NO.ATagParams.cObject {
>   field = tx_classified_css
>   split {
>     token = |
>     returnKey = 0
>   }
> }
> Everything is okay until I need to use ACT statement, which needs an
> additional class-name 'active' to be added.
> If I use such declaration:
> lib.main_menu.1.ACT.ATagParams.wrap = class="| active"
> I'm getting <a href="<url>" class="cat-1active", because whitespaces are
> removed.
> Tried to add &nbsp; - but it didn't help.
>
> How can I solve this problem?


ATagParams has .stdWrap capability [1], so you can replace the line with

lib.main_menu.1.ACT.ATagParams.noTrimWrap = |class="| active"|

-- 
Christopher Torgalson
http://www.typo3apprentice.com/

[1] http://typo3.org/documentation/document-library/core-documentation/doc_core_tsref/4.3.2/view/1/9/#id2533628


More information about the TYPO3-english mailing list