url

An article by Gaspard Bucher

Return the url of a node.

  1. action
  2. ajax
  3. API
  4. classes
  5. common attributes
  6. conditions
  7. context
  8. dates
  9. display
  10. forms
  11. i18n
  12. meta
  13. SQLiss
  14. urls
    1. anchor
    2. link
    3. path
    4. url

Return the url of a node.

  • node (optional: uses current node by default)
  • opts (optional: can contain ‘host’, ‘ssl’ or other params)
see link, path, zena 1.0

This helper displays the full url of the current node. It can be used in html attributes:

<a href='#{url}'>this is a link</a>
===>
<a href='http://test.host/oo/page22.html'>this is a link</a>

Or anywhere else (javascript is an idea):

<script type='text/javascript'>
  digg_url = '<r:url/>';
</script>

You can also specify the node to use:

<r:eval>url(parent)</r:eval>

But this last example might be more readable with:

<r:parent do='url'/>