Title and Caption not showing up with viewers

5 posts by 2 authors in: Forums > CMS Builder
Last Post: June 18, 2009   (RSS)

Re: [equinox69] Title and Caption not showing up with viewers

By ross - June 17, 2009

Hi there.

Thanks for posting!

By default, the caption and title aren't used so you should just need to add in the code that makes them display.

It will look something like this:

$upload['info1']

or

$upload['info2']

Basically, each of those fields are called info and then they have a number. You can have up to 4 if you wanted to store more info with each image.

Have a look and let me know what you think ).
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/

Re: [ross] Title and Caption not showing up with viewers

By Codee - June 17, 2009

Ross, made a quick attempt and failed...so, here's the code for one of the sites. How do I insert that code into it?
------------



<!-- STEP 2a: Display Uploads for field 'photos' (Paste this anywhere inside STEP2 to display uploads) -->

<!-- Upload Fields: num, createdTime, tableName, fieldName, recordNum, preSaveTempId, filePath, filename, extension, thumbFilePath,

isImage, hasThumbnail, urlPath, width, height, thumbUrlPath, thumbWidth, thumbHeight, info1, info2, info3, info4, info5 -->

<?php foreach ($inventoryRecord['photos'] as $upload): ?>

<?php if ($upload['hasThumbnail']): ?>

<a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo

$upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /></a><br/><br/>


<?php elseif ($upload['isImage']): ?>

<a href="<?php echo $upload['urlPath'] ?>" target="_blank"><img src="<?php echo $upload['urlPath'] ?>" width="<?php echo

$upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /></a><br/>



<?php else: ?>

<a href="<?php echo $upload['urlPath'] ?>">Download <?php echo $upload['filename'] ?></a><br/>



<?php endif ?>

<?php endforeach ?>



<!-- STEP2a: /Display Uploads -->
--------

Re: [equinox69] Title and Caption not showing up with viewers

By Codee - June 17, 2009

Never mind...duh...used an echo statement.

What I would strongly recommend is that CMSB "should" see when these fields are used in the uploader and generate the code for the view automatically.

Re: [equinox69] Title and Caption not showing up with viewers

By ross - June 18, 2009

Hi there.

Thanks for the update!

Glad to here you got that sorted out :). I'll make a note about having those fields appear when they are in use. I am not sure how that will work but it's on the list now :).

Let me know if you need a hand with anything else. Thanks!
-----------------------------------------------------------
Cheers,
Ross Fairbairn - Consulting
consulting@interactivetools.com

Hire me! Save time by getting our experts to help with your project.
Template changes, advanced features, full integration, whatever you
need. Whether you need one hour or fifty, get it done fast with
Priority Consulting: http://www.interactivetools.com/consulting/