url_for
url_for is a Liquid tag to get the URL of some page on the site. It is the Liquid equivalent of the ActionController::Base#url_for function in Ruby on Rails.
Syntax
url_for expects the same parameters as ActionController::Base#url_for, which means you should give it the attributes controller, action, possibly an id or a slug, and if necessary also anchor. The values for these attributes can be encapsulated in single or double quotes, this is optional.
Please note that you can't use variables as attribute values, which is why the url_for_* filters exist.
Examples
{% url_for controller: blog, action: home, anchor: test %}
=> http://www.example.com/#test
{% url_for controller: blog, action: search %}
=> http://www.example.com/search
{% url_for controller: 'feed', action: 'entries' %}
=> http://www.example.com/feed/entries
page_revision: 2, last_edited: 1180456931|%e %b %Y, %H:%M %Z (%O ago)





