Categories

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

By (Deleted User) - October 29, 2010

Hi Guys,

I'm currently using the category / subcategory list option on my site and in it I have a number of categories and sub-categories listed.

The problem however is that when given the option to select which category you want, you cannot distinguish in the list which is a category and which is a sub-category? The all appear in one long list.

Is there a way to somehow show visual difference between main categories and sub categories?

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