}
if (!empty($link['Attachment'])) {
- $file = $this->Upfile->file(
- 's',
- CorePlus::get_value($link, 'Attachment.0'),
- array(
- 'model_name' => 'Link',
- 'mime_type' => 'original',
- )
- );
- echo $this->Upfile->embed(
- $file,
- array(
- 'linkTo' => $url,
- 'alt' => $title,
- 'restrict' => array('image'),
+ echo $this->element('link_banner', array(
+ 'attachment' => $link['Attachment'][0],
+ 'name' => $title,
+ 'options' => array(
+ 'url' => $url,
'htmlAttributes' => array(
- 'class' => 'linkBanner',
- 'target' => '_blank',
+ 'title' => $title,
),
)
- );
+ ));
}
?>
<h3>