Development

Changeset 1341

You must first sign up to be able to contribute.

Changeset 1341

Show
Ignore:
Timestamp:
05/11/06 14:28:47 (3 years ago)
Author:
francois
Message:

documented absolute paths in url and asset helpers

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/doc/book/content/templating_link_helpers.txt

    r1229 r1341  
    289289 
    290290>**Note**: You may be looking for a `stylesheet_tag()` helper, but there is none. If you need to include a custom stylesheet, you should not do it in the template but rather in the view or in the action, as described in the [view configuration chapter](templating_configuration.txt). This way, the declaration appears in the `<head>` instead of in the `<body>`. 
     291 
     292Absolute paths 
     293-------------- 
     294 
     295The url and asset helpers generate relative paths by default. You can easily add an `absolute=true` parameter to force the output to absolute paths, for instance for inclusions of links in an email, a RSS feed, or an API response. 
     296 
     297    [php] 
     298    <?php echo url_for('module/action', true) ?> 
     299    <?php echo link_to('my link', 'module/action', 'absolute=true') ?> 
     300    <?php echo image_tag('test', 'absolute=true') ?> 
     301    <?php echo javascript_include_tag('myscript', 'absolute=true') ?>