Categories

4 posts by 3 authors in: Forums > CMS Builder
Last Post: November 1, 2010   (RSS)

Re: [smesa] Categories

By Chris - October 29, 2010

Hi smesa,

The simplest approach is to use the '_listItemStart' and '_listItemEnd' pseudofields. See the first post in my Sub-categories Tutorial for an example:

http://www.interactivetools.com/forum/gforum.cgi?post=77230

Another approach might use the 'depth' field.

I hope this helps! Please let me know if you have any questions.
All the best,
Chris

Re: [chris] Categories

By (Deleted User) - November 1, 2010

Thank you Chris, works perfectly.

Wanted to ask something about the thumbnail images on the upload feature. How do I get the second thumbnail to display if I've opted for 2 different thumbnails? At the moment it's defaulting to the main thumbnail image.

Here's the current code:

<?php foreach ($featuredRecord['image'] as $upload): ?>
<?php if ($upload['hasThumbnail']): ?>
<img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="" /><br/>

<?php elseif ($upload['isImage']): ?>
<img src="<?php echo $upload['urlPath'] ?>" width="<?php echo $upload['width'] ?>" height="<?php echo $upload['height'] ?>" alt="" /><br/>

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

<?php endif ?>
<?php endforeach ?>

Kind regards

Shawn

Re: [smesa] Categories

By Jason - November 1, 2010

Hi Shawn,

If you've opted to create 2 different thumbnails, you can get the second type by adding a "2" to the end of your fields like this:

<img src="<?php echo $upload['thumbUrlPath2'] ?>" width="<?php echo $upload['thumbWidth2'] ?>" height="<?php echo $upload['thumbHeight2'] ?>" alt="" /><br/>

Hope this helps.
---------------------------------------------------
Jason Sauchuk - Project Manager
interactivetools.com

Hire me! Save time by getting our experts to help with your project.
http://www.interactivetools.com/consulting/