ekxz900
ekxz900

Reputation: 117

Can we set the content field in basic web content in Liferay using velocity language?

I'm trying to achieve a web content display in Liferay that changes the "content" after a certain date. For instance from now till 04/05/2018 it shows "Hello world" but after that specified date it shows "Hola Mundo". Can it be achieved using the velocity script?I'm using Liferay 7.0

Upvotes: 1

Views: 76

Answers (1)

Claude Brisson
Claude Brisson

Reputation: 4130

Maybe something like:

#if($date.get('yyyy-MM-dd') < '2018-05-04')
  Hello World
#else
  Hola Mundo
#end

Upvotes: 1

Related Questions