User Manual

Link Tag (ERB)

The Link Tag allows you to build links to other pages in Interface or create generic links that do not refer to Pages.

Tag Options

  • :url — The URL to link to.
  • :text — The text to use in the link. If not set, it will use the URL itself.
  • :query — A query string to append to the URL.

In addition to these options, all the link_to options from Rails can be applied (see Rails Documentation for link_to)

Code Example

Here is a basic example of using the link tag:

<%= link(:url => 'http://www.google.com', :text => 'Google', :query => 'q=Search') %>

That will yield a result of:

<a href="http://www.google.com?q=Search">Google</a>

If you want to make the link open in a new window, add :popup => true:

<%= link(:url => 'http://www.google.com', :popup => true) %>