Home | Products | Consulting | Hosting | Forums | Support | Order | 1-800-752-0455
  Main
Index
Search
Posts
Who's
Online
Log
In

Home: Products: CMS Builder:
group sub categories

 

 


IronVictory
User

Jul 16, 2008, 10:37 PM

Post #1 of 4 (212 views)
Shortcut
group sub categories Can't Post

I am trying to display "sub categories" grouped on a page like this:

Main category title
Sub category 1 title
- product thumbnail
- product thumbnail
- product thumbnail
Sub category 2 title
- product thumbnail
- product thumbnail
- product thumbnail

I have a list field set up as 'sub_category' in the 'products' section.
How can I group the sub category products on the main category page?


Dave
Staff / Moderator


Jul 16, 2008, 11:20 PM

Post #2 of 4 (209 views)
Shortcut
Re: [IronVictory] group sub categories [In reply to] Can't Post

Hi IronVictory,

Depending on how your list page is setup, the easiest way to group them might be to just sort by subcategory and then title on your list page. Your order by might look like this (in red):


Code
 list($records, $recordMetaData) = getRecords(array( 
'tableName' => 'products',
...
'orderBy' => 'sub_category, title',
...
));


If that doesn't do it let me know some more details and we'll help you figure it out!

Dave Edis - Senior Developer
interactivetools.com


IronVictory
User

Jul 17, 2008, 10:55 AM

Post #3 of 4 (194 views)
Shortcut
Re: [Dave] group sub categories [In reply to] Can't Post

Hi Dave,
This is what I have for the viewer and it just repeats. I need $record['sub_category'] as the title, then the thumbnails listed below.


Code
<?php foreach ($productsRecords as $record): ?> 

<div class="prod_title"><?php echo $record['sub_category'] ?> <?php echo $record['category'] ?></div>

<?php foreach ($record['product_image'] as $upload): ?>
<div class="prodlist"><a href="<?php echo $record['_link'] ?>&category=Sinks"><img src="<?php echo $upload['thumbUrlPath'] ?>" width="<?php echo $upload['thumbWidth'] ?>" height="<?php echo $upload['thumbHeight'] ?>" alt="<?php echo $record['productName'] ?>" border="0" /></a><br/>
<?php echo $record['model'] ?></div>
<?php endforeach ?>

<?php endforeach; ?>



Dave
Staff / Moderator


Jul 18, 2008, 2:17 PM

Post #4 of 4 (149 views)
Shortcut
Re: [IronVictory] group sub categories [In reply to] Can't Post

What is it repeating? Is it sorting the subgroup items together, though?

Do you have an url that you can post? Let me know some more details and I'll try and help! :)

Dave Edis - Senior Developer
interactivetools.com

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
Hosting
Support
Online Documentation
Support Forums
Support Homepage
Company Info
12 reasons to choose us!
Meet the team
Monthly newsletter
Contact Us
Toll Free: 1-800-752-0455
Phone: (604) 689-3347
Sales | Support
Conditions of Use | Privacy Policy | Copyright © interactivetools.com 2008
#201 - 2730 Commercial Drive, Vancouver BC Canada V5N 5P4