[TYPO3-english] [TYPO3-UG English] Typoscript date check
David Bruchmann
typo3-en at bruchmann-web.de
Fri Aug 28 16:14:52 CEST 2009
----- Ursprüngliche Nachricht -----
Von: René van Densen <statusnil at gmail.com>
Gesendet: Freitag, 28. August 2009 15:50:08
An: TYPO3 English <typo3-english at lists.netfielders.de>
CC:
Betreff: Re: [TYPO3-english] [TYPO3-UG English] Typoscript date check
> Hi Tomas,
>
> thanks - I did find this by now but it doesn't work for my specific
> situation. I forgot to mention this is in the context of tt_news. So
> basically I want specific outputs for the weekday of an article... I tried
> the below but it doesn't work, I don't think tt_news items have a dayofweek
> value... Yet it can be outputted, like say
> date_stdWrap.strftime= %w
> So certainly it can be 'catched' as well ??
>
> (I tried this:)
> plugin.tt_news {
> displaySingle {
>
> [dayofweek = 1]
> # If Monday, define a certain value
> [dayofweek = 2]
> # If Tuesday, define a certain value
> [dayofweek = 3]
> # If Wednesday, define a certain value
> [dayofweek = 4]
> # If Thursday, define a certain value
> [dayofweek = 5]
> # If Friday, define a certain value
> [dayofweek = 6]
> # If Saturday, define a certain value
> [else]
> # If Sunday, define a certain value
> [end]
> }
> }
>
> On Fri, Aug 28, 2009 at 3:44 PM, Tomas Mrozek <mail at cascaval.com> wrote:
>
>> Example: [dayofweek = 1]
>> Reference:
>>
>> http://typo3.org/documentation/document-library/references/doc_core_tsref/4.2.0/view/1/4/#id4149127
Hy Rene,
Conditions inside brackets aren't allowed and do not work.
When you've changed that and it doesn't work too I propose to use a
userfunction :
[userFunc = user_match(checkDayofweek)]
I didn't work with that, so you've to test how to do exactly.
But first try to note your conditions outside the brackets.
Best Regards
David
More information about the TYPO3-english
mailing list