WeStandWithUkraine

102 Posts
Osep45
4 years ago
3
Topic

Hello, 

In my template variation for an agenda, I would like to write a condition using the year...

In my content form, the year of the article is defined by a "numerical field" (screenshot after my text...)

When I define my variable, it doesn't work : the value of the year is not identified, when using $annee = $cck->get('dio_agendamois_annee')->value; or

$annee = $cck->getText('dio_agendamois_annee') ; or $annee = $cck->renderField('dio_agendamois_annee') ; or

$annee = $cck->getValue('dio_agendamois_annee') ;

How should I define my variable ? 

thanks for your answer !

Get a VIP membership
4229 Posts
Kadministrator
4 years ago
2
Level 1

$cck->getValue('dio_agendamois_annee') should work whey you are in content view. 

102 Posts
Osep45
4 years ago
1
Level 2

Thanks ! but if I am in a list view... how could I do..?

1279 Posts
Bucklash
4 years ago
0
Level 3

Hi

List view or ITEM view?

Can't do position variations in list view - damn shame :)

Get a Book for SEBLOD