Category not working as intended

15 posts by 2 authors in: Forums > CMS Builder
Last Post: February 3, 2009   (RSS)

Okay, I have a page 6 Categories, and a multitude of products under each category. However, the products are showing up on the main category page:

http://209.62.14.161/products/furnlistList.php

I have Square End Table set up as a child in the CMS Admin, but what gives? Is it anything to do with the Summary entry being Empty?

Please Advise

Re: [Dave] Category not working as intended

Here ya go!

Re: [misery217] Category not working as intended

By Dave - January 30, 2009

The forum software is a little confusing. You need to click that "Upload attachment" before you click "Post". Otherwise it won't upload automatically. :)
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Category not working as intended

One more time
Attachments:

furnlistlist.php 29K

Re: [misery217] Category not working as intended

By Dave - January 30, 2009

Everything looks good in the code from what I can tell. What kind of section is it? A multi-record section or a category section?

Do you have a mockup of how you want the list page to look?
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Category not working as intended

i have it set as a category Section. The mock-up would be

http://209.62.14.161/products/furnlistList.php

But with the Second Entry. The second entry should be under the first category (Tables). Should I just delete the second entry and re-enter it again? It does show in the Admin to be under Tables... Curious...

Re: [misery217] Category not working as intended

By Dave - January 30, 2009

The category sections work a little differently. Probably the simplest way to move forward from here would be to test for the field "depth" and if it's 1 then show the record as indented under the parent record. Like this:

<?php if ($record['depth'] == 1): ?>
... show indented record here ...
<?php endif ?>

Let me know if that will work for you.
Dave Edis - Senior Developer
interactivetools.com

Re: [Dave] Category not working as intended

Okay, sorry for the misunderstanding. The only sections that should be on the first page are: Tables, Gliders, Swings, Chairs & Rockers, and Other. The "Square End Table" Entry should not be that page at all. Square End Table shouldn't bee seen until after you click the "Tables" Main Category.

As it is now, it's showing in the main menu, which is incorrect. So I'm not sure the depth indicator would work?
Sorry for the delay, weekends and all!!!

Thanks for the continued support!!!

Re: [misery217] Category not working as intended

By Dave - February 2, 2009

You could try limiting the results with a where at the top:

list($furnlistRecords, $furnlistMetaData) = getRecords(array(
'tableName' => 'furnlist',
'where' => " depth = 0 ",
));


Let me know if that works for you.
Dave Edis - Senior Developer
interactivetools.com