[TYPO3] Typo deleting html template content

Peter Klein peter at umloud.dk
Wed Feb 1 16:03:34 CET 2006


Just noticed that the last "trim" didn't work as expected (It trims the 
string BEFORE splitting, and not after.)

This updated code should fix that problem..

-- cut --
NO.stdWrap.cObject = TEXT
NO.stdWrap.cObject.cObject = TEXT
NO.stdWrap.cObject.cObject.value = This is on the left of the split | This 
is on the right of the split
NO.stdWrap.cObject.cObject.split {
    # Split the string at the "|" char
    token = |
    cObjNum = 1
    1.current = 1
    # Trim away any leading/trailing spaces
    1.trim = 1
    # Wrap each part with a space at the end.
    1.noTrimWrap = || |
  }
  # Trim away the final trailing spaces
NO.stdWrap.cObject.trim = 1
-- cut --

-- 
Peter Klein/Umloud Untd


"Peter Klein" <peter at umloud.dk> skrev i en meddelelse 
news:mailman.1.1138747428.27584.typo3-english at lists.netfielders.de...
> Hi Jody. If you want to use the 1st option Christopher described, then you 
> can do it like this:
>
> --- cut ---
> NO.stdWrap.cObject = TEXT
> NO.stdWrap.cObject.field = title
> NO.stdWrap.cObject.split {
>    # Split the string at the "|" char
>    token = |
>    cObjNum = 1
>    1.current = 1
>    # Trim away any leading/trailing spaces
>    1.trim = 1
>    # Wrap each part with a space at the end.
>    1.noTrimWrap = || |
>  }
>  # Trim away the final trailing spaces
> NO.stdWrap.cObject.trim = 1
> --- cut ---
>
>
> ---
> Peter Klein / Umloud Untd
>
>
> "Jody Cleveland" <Cleveland at winnefox.org> wrote in message 
> news:mailman.10705.1138745524.6406.typo3-english at lists.netfielders.de...
>>> Oh, I see. It's that the actual db field contains the '|'. The way I
>>> see it, you have two choices:
>>>
>>> 2. Get the bottom menu items to display from an alternate field in the
>>> pages table (such as the description field etc) (easier, but not so
>>> maintainable)
>>
>> How would I go about doing this?
>>
>> Btw, thank you so much for taking the time to help me with this. I
>> really appreciate it!
>>
>> - jody
>
> 





More information about the TYPO3-english mailing list