Hi,
I've created a template that we use to get the top three page objects having tag = events.
This workes just fine.
My problem:Code:<h1>Template:EventLinks</h1> <p style="padding: 20px 0pt 0pt 10px;">UPCOMING EVENTS:</p> <div init="var x = 0; var ix = wiki.getsearch{query: 'tag:Event', max: 3, sortby: 'date'}"> <div foreach="var p in ix"> <p class="eventlink">{{web.link(p.uri, p.title)}}</p> </div> </div>
I want the first returned record in the foreach loop to get another style by using a different class name for that record.
I've been trying the "if else" statement with a variable that increments 1 step for each record, but this does not seem to work inside the foreach loop.
Does anyone have an idea on what to do?


Reply With Quote