OSDN Git Service

バナー表示を調節
[trpgtools-onweb/cake-frame.git] / app / plugins / links / views / elements / link_view.ctp
index 652d3ea..f165c2d 100644 (file)
@@ -35,26 +35,16 @@ if (!empty($link['Link']['title'])) {
 }
 
 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>