[TYPO3-english] [TYPO3-UG English] Typoscript date check
René van Densen
statusnil at gmail.com
Mon Aug 31 15:04:08 CEST 2009
Agreed, I apologise for being unclear. As I said, I'm still new to
Typoscript so I didn't even realise the difference until after trying out
several things.
What I'm trying to do is this:
[globalVar = GP:L=0]
config {
sys_language_uid = 0
language = nl
locale_all = nl_NL
htmlTag_langKey = nl
}
page.meta {
Language = nl
Content-language = nl
}
page.headerData.11 = TEXT
page.headerData.11.value = <meta http-equiv="content-language" content="nl">
# set dutch date & time formats
plugin.tt_news {
archiveTitleCObject {
10.strftime = %B - %Y
}
getRelatedCObject {
20.strftime = %d.%m.%Y %H:%M
}
displaySingle {
[date_stdWrap.if.field = 1]
date_stdWrap.strftime= Maandag, %D
[weekday_stdWrap.if = 2]
date_stdWrap.strftime= Dinsdag, %D
[value.strftime.date-conf.w = 3]
date_stdWrap.strftime= Woensdag, %D
[value.strftime.date-conf.w = 4]
date_stdWrap.strftime= Donderdag, %D
[value.strftime.date-conf.w = 5]
date_stdWrap.strftime= Vrijdag, %D
[value.strftime.date-conf.w = 6]
date_stdWrap.strftime= Zaterdag, %D
[value.strftime.date-conf.w = 0]
date_stdWrap.strftime= Zondag, %D
[value.strftime.date-conf.w = 7]
date_stdWrap.strftime= Zondag, %D
[else]
date_stdWrap.strftime= %A, %w %D
[end]
# date_stdWrap.strftime= %D
time_stdWrap.strftime= %H:%M
age_stdWrap.age = Minuten | Uren | Dagen | Jaren
}
displayLatest {
date_stdWrap.strftime= %d.%m.%y
time_stdWrap.strftime= %H:%M
}
displayList {
date_stdWrap.strftime= %A %d. %B %Y
time_stdWrap.strftime= %d.%m.%y %H:%M
}
}
[global]
I'm not allowed to install the language packs on the server itself so I'm
trying to 'bypass' the standard English-weekday name (%A) for the languages
defined in my site.
If I can just access the 'weekday output' so to speak, and based on that
select a value for my variable, it should work fine.
Anyone have any idea how to do this ?
On Fri, Aug 28, 2009 at 5:19 PM, Tomas Mrozek <mail at cascaval.com> wrote:
> I see... that you omitted some pretty important information in your
> original post. There is a world of difference between "condition based
> on a (current) weekday" and "condition based on a weekday of a tt_news
> article"!
>
> Anyway, I think you should specify exactly what attribute you are trying
> to set according to the given condition.
>
> Next time you post, try to specify EXACTLY what you are trying to
> achieve instead of starting with some general question about TypoScript.
>
> Tomas Mrozek
> _______________________________________________
> TYPO3-english mailing list
> TYPO3-english at lists.netfielders.de
> http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
>
More information about the TYPO3-english
mailing list