You are here

function asset_wizard_preview in Asset 6

Same name and namespace in other branches
  1. 5.2 asset_wizard.module \asset_wizard_preview()

Step 4: Display a preview of the formatted asset

1 string reference to 'asset_wizard_preview'
asset_wizard_menu in ./asset_wizard.module
Implementation of hook_menu().

File

./asset_wizard.module, line 518
Wizard-style interface for Asset.

Code

function asset_wizard_preview($asset, $macro) {
  if (is_numeric($macro)) {
    $preview = asset_view($asset);
  }
  else {
    $macros = asset_get_macros($macro);
    $format = $macros[$macro];
    $preview = asset_render_macro($format);
  }
  $content = theme('asset_wizard_preview', $asset, $preview, $macro);
  return theme('asset_wizard_page', $content);
}