You are here

function theme_asset_render_default in Asset 5

Same name and namespace in other branches
  1. 6 inc/asset.themes.inc \theme_asset_render_default()

Default rendering available to all assets.

2 theme calls to theme_asset_render_default()
asset_asset_formatter in ./asset.module
Implementation of hook_asset_formatter().
asset_render_macro in ./asset.module
build html from atrributes array.

File

./asset.module, line 1081

Code

function theme_asset_render_default($asset) {
  if (substr($asset->url, 0, 5) != "http:") {
    $asset->url = url($asset->url);
  }
  $asset->title = $asset->title ? $asset->title : $asset->filename;
  return '<a href="' . $asset->url . '" class="asset">' . $asset->title . '</a>';
}