 | |  |
 |

DHester
User
Apr 4, 2008, 9:10 PM
Post #1 of 3
(278 views)
Shortcut
|
|
Displaying Upload Field Data
|
Can't Post
|
|
I'm creating a blog/news section on my site using CMS Builder. With each post, the user will have an option to create a gallery of related images using the 'upload' field type. Works great but I need to add some conditional logic: If record exists and the 'Gallery' upload field has at least 1 photo in it then: Display a custom CSS div with all the images inside Else: Don't show any CSS div for the gallery / Don't show any images. Make sense? Right now my code displays a empty gallery box if no images are in the upload field. I'd prefer not to show anything at all ( no gallery box ). I need to check if 'gallery' contains any items before the foreach is executed to display the items: <?php foreach (getUploads($options['tableName'], 'gallery', $record['num']) as $upload): ?> Can someone point me in the right direction? Thanks Darren Hester www.designsbydarren.com
(This post was edited by DHester on Apr 4, 2008, 9:12 PM)
|
|
|  |
 | |  |
 |

Dave
Staff
/ Moderator

Apr 5, 2008, 10:00 PM
Post #3 of 3
(243 views)
Shortcut
|
|
Re: [DHester] Displaying Upload Field Data
[In reply to]
|
Can't Post
|
|
Glad you figured it out and thanks for posting the link for others! I'll get your next question! :) Dave Edis - Senior Developer interactivetools.com
|
|
|  |
|