Skip to content

Instantly share code, notes, and snippets.

@joergviola
Created October 15, 2012 20:11
Show Gist options
  • Save joergviola/3895052 to your computer and use it in GitHub Desktop.
Save joergviola/3895052 to your computer and use it in GitHub Desktop.
Partially applied function in scala template
@(category:models.Category)
@defining(if(category==null) routes.RssController.feedAll(_:String) else routes.RssController.feed(_:String, category.id )) { rssUrl =>
<div id="newsFeedBlock">
<a href="@rssUrl("rss_2.0")" target="_blank">
<img id="newsFeedIcon" src="/assets/images/feed-icon-28x28.png" alt="NewsFeed" />
</a>
<div id="rssDetails" style="display: none;" />
Abonnieren als
<a href="@rssUrl("rss_2.0")" target="_blank">Rss 2.0</a>
oder
<a href="@rssUrl("atom_1.0")" target="_blank">Atom 1.0</a>
Feed ?
</div>
</div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment