I am creating a list with articles:

<ul class="featured">
<!-- template insert : $articleList$ -->

<!-- templatecell : articleRow -->
<li><a href="$published.MOVIE.url$">$article.cover$</a></li>
<!-- /templatecell : articleRow -->
<!-- templatecell : article.cover.Row -->
<img src="$file.WebUrl$">
<!-- /templatecell : article.cover.Row -->

I would like to use an if statement (could also be php) to check for the last article. If it is the last article, i need to give the <li> the class "last"

Is this possible?

Re: [nkerschgens] Check if article is the last one

Hi there,

There's a "last article number" placeholder you could try using for this. See if this works for you:

<!-- templatecell : articleRow -->

<li [templateIf : $articlelist.currentresultnumber$ == $articlelist.lastresultnumber$] class="last" [/templateIf]><a href="$published.MOVIE.url$">$article.cover$</a></li>

<!-- /templatecell : articleRow -->

This just replaces the middle part of the code you quoted, so just the Article Row. The rest would stay the same.

Give that a try and let me know how it works. :)