Hide/Display fields in template view

Hello!
In my calendar I have set many custom fields and an event that “busy” the hours when the office is closed (from 13:00 to 14:30).
I modify the scheduler.templates.event_text=function(start,end,event) (that you can say in template tabs in joomla back end) to display many custom fields and some fixed words.

I need that for some events… in particulary two events that i repeat forever, nothing appear. Just show the “CLOSED” write.

No my template it’s in this way:

scheduler.templates.event_text=function(start,end,event){ return "Professionista Delegato - RGE " + event.rge + " Immobiliare - " + event.comune+" - "+event.indirizzo_immobile+ " - "+scheduler.getLabel("vendita", event.vendita); }

I need something like this

IF (eventiwant) return "CLOSED" ELSE return "Professionista Delegato - RGE " + event.rge + " Immobiliare - " + event.comune+" - "+event.indirizzo_immobile+ " - "+scheduler.getLabel("vendita", event.vendita);

I hope I explained myself, I’m not english :smiley:

Anyone can help me?

up?

Hi,
sorry for the delay in the answerring.
You may access event details inside this function - it takes parameters start_date, end_date and event object.
So you may check start/end time and return “Closed” when you need.

I give it a try, thank you… if I can’t reach may I ask you an example? Thank you

You may set some specific text for block events, for example “block_event”.
Then you may use the follow template:

IF (event.text=="block_event") return "CLOSED"
ELSE
return "Professionista Delegato - RGE " + event.rge + " Immobiliare - " + event.comune+" - "+event.indirizzo_immobile+ " - "+scheduler.getLabel("vendita", event.vendita);

So text CLOSED will be applied only for specific events with text “block_event”.
It would be easier than to compare time.

I love you, seriously.