Jump to content
Larry Ullman's Book Forums

Display Multiple Images In Cdetailview


Recommended Posts

Larry,

 

I have been surfing all day and can not find the topic, how to display multiple images in CDetailView.

My situation are as follows:

  1. I have uploaded multiple images, the image jpg files stored in /images/doc directory.
  2. I have entried path to the images in a cell, means the cell contain three filenames with comma separated: abc.jpg, xyz.jpg, abaca.jpg.

I wanna to display the link in CDetailView which clickable to open the image in new tab browser.

 

I have tried with this script:

 

array(
                    'name'=>'File Link',
                    'type'=>'raw',
                    'value'=>CHtml::link($model->bukti, Yii::getPathOfAlias('webroot').'/images/doc/'.implode(',', array($model->bukti))),
                     ),

 

but the result is not as I expected, when I click the link  unrecognized opened by the browser.

 

I expect result like this:

...

...

File Link : abc.jpg

                xyz.jpg

                abaca.jpg <== each must be clickable to the location of the image

...

...

 

I hope you could assist me to solve this problem.

 

Kind regards,

 

 

Maman Hermansyah

 

Link to post
Share on other sites
  • 2 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...