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

Home: Products: CMS Builder:
Categories

 

 


andycal
User

Jun 8, 2008, 6:33 AM

Post #1 of 5 (245 views)
Shortcut
Categories Can't Post

Anyone got any clue how to use 'categories'?


Dave
Staff / Moderator


Jun 9, 2008, 11:30 AM

Post #2 of 5 (226 views)
Shortcut
Re: [andycal] Categories [In reply to] Can't Post

Hi andycal,

Categories are a bit of an advanced feature right now, but maybe I can help you out.

Have you created any other CMS Builder section editors or viewers yet? And what did you want to use categories for?

Dave Edis - Senior Developer
interactivetools.com


andycal
User

Jun 11, 2008, 6:22 AM

Post #3 of 5 (216 views)
Shortcut
Re: [Dave] Categories [In reply to] Can't Post

Hiya,

I was juist wondering how to use them to display stuff, but having looked at the database tables it looks pretty straight forward. I'm going to have a play with writing my own code for now, I guess it will be a lot easier in later versions of CMS builder.


Dave
Staff / Moderator


Jun 11, 2008, 9:52 AM

Post #4 of 5 (209 views)
Shortcut
Re: [andycal] Categories [In reply to] Can't Post

It's pretty much the same as with a regular list of records, except it automatically figured out and assigns a value for 'depth'. So say your variable is named $record['depth'] you can use that to display different classnames (menudepth0, menuDepth1, etc) or use PHP to display different html based on the depth:


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

<?php if ($record['depth'] == 0): ?>
<?php echo $record['name'] ?>
<?php endif ?>

<?php if ($record['depth'] == 1): ?>
- <?php echo $record['name'] ?>
<?php endif ?>

<?php if ($record['depth'] == 2): ?>
&nbsp;&nbsp;&nbsp; - <?php echo $record['name'] ?>
<?php endif ?>

<?php endoforeach ?>


The first step is to figure out how you want your categories to look in HTML. Then figure out how to get CMS Builder to output that.

Hope that helps, let me know if you need any more assistance with this one. And yes in future we'll add more options to the code generator to automatically generate category menus for you.

Dave Edis - Senior Developer
interactivetools.com


andycal
User

Jun 11, 2008, 10:11 AM

Post #5 of 5 (207 views)
Shortcut
Re: [Dave] Categories [In reply to] Can't Post

Very cool! Thanks Dave, just off to buy another couple of copies by the way, before the offer ends!

 
 
 


Search for (options)
Products
CMS Builder
Article Manager
Realty Manager
Listings Manager
Order Now
Services
Priority Consulting
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