Hi. I have a global macro named “time_of_day”.
\define time_of_day()
<$list filter="[<now hh>compare:number:gt[5]compare:number:lt[12]]">
morning
</$list>
<$list filter="[<now hh>compare:number:gt[11]compare:number:lt[19]]">
afternoon
</$list>
<$list filter="[<now hh>compare:number:gt[18]compare:number:lt[24]]">
evening
</$list>
<$list filter="[<now hh>compare:number:gt[0]compare:number:lt[6]]">
night
</$list>
\end
I am trying to get it to return a value in the context of an HTML attribute:
<$link to=Welcome>
<div id='covertiddler' class=<<time_of_day>>></div>
</$link>
I am expecting it to return as
<$link to=Welcome>
<div id='covertiddler' class=evening></div>
</$link>
Instead, I am getting the entire macro piped into the attribute.
I have tried using the set and wikify widget and have still not figured out how to do this correctly.