Skip to content

Instantly share code, notes, and snippets.

@argius
Last active August 29, 2015 14:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save argius/11320011 to your computer and use it in GitHub Desktop.
Save argius/11320011 to your computer and use it in GitHub Desktop.
Try to shorten pagination codes in Skinny 1.0.9
ul.pagination
li
- for (i <- (0 to totalPages + 1); p <- Seq(if (i == 0) (1, "&laquo;") else if (i == totalPages + 1) (totalPages, "&raquo;") else (i, i.toString)))
li
a(href={s.url(Controllers.members.indexUrl, "page" -> p._1)}) #{unescape(p._2)}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment