Header Assignment With DatetimeConditions

Hi,

I have a website with two different headers - a standard header for use from 1st January until 30th November; and a festive header for use from 1st December till 31st December. In each case, they will be assigned to the entire site.

How can I assign the headers based upon the month and day, but ignoring the year, so that the correct header will be automatically assigned throughout the year?

I tried doing the below in the header settings, but it caused the header to revert to the default (non-Cornerstone) header, rather than the correct headers.

CONDITIONS (Festive Header)
Entire site
{{dc:global:date format="m d"}} after Nov 30
{{dc:global:date format="m d"}} before Jan 01

CONDITIONS (Standard Header)
Entire site
{{dc:global:date format="m d"}} after Dec 31
{{dc:global:date format="m d"}} before Dec 01

Any help would be appreciated.

Thanks,
Christopher

Hey Christopher,

Thanks for writing in!

Your conditions might be this:

CONDITIONS (Festive Header)
Entire site
{{dc:global:date format="m d"}} after Nov 30
AND
{{dc:global:date format="m d"}} before Jan 01

CONDITIONS (Standard Header)
Entire site
{{dc:global:date format="m d"}} after Dec 31 
OR
{{dc:global:date format="m d"}} before Dec 01

The default header will display if none of the conditions above will be TRUE.

Hope this helps.

Hi @ruenel,

That is what I tried and none of my CS headers display. My question is really, are the conditions in the correct syntax / format?

In either case, both headers should apply to the entire website. However, each year the standard header should display from 1st January 00:00:00 GMT until 30th November 23:59:59 GMT. The festive header should display from 1st December 00:00:00 GMT until 31st December 23:59:59 GMT. This should happen every year without needing to reference the years.

Thanks,
Christopher

Hey Christopher,

Have your condition updated with the correct dynamic content:

CONDITIONS (Festive Header)
Entire site
{{dc:global:date format="M d"}} after Nov 30
AND
{{dc:global:date format="M d"}} before Jan 01

CONDITIONS (Standard Header)
Entire site
{{dc:global:date format="M d"}} after Dec 31 
OR
{{dc:global:date format="M d"}} before Dec 01

Kindly let us know how it goes.

Thanks @ruenel,

It seems to be working now.

Thanks,
Christopher

Hi Christopher,

Glad to know that it is working now.

Thanks

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.