Displaying category levels in navigation

2 posts by 2 authors in: Forums > CMS Builder
Last Post: May 27, 2013   (RSS)

By gregThomas - May 27, 2013

Hi Tim,

As the top links are going to only be from the top level of the category system, what about using a getRecords function instead. I would replace your current $level1MenuRecords getCategories function with this:

  // load records from 'animal_category'
  list($level1MenuRecords, $animal_categoryMetaData) = getRecords(array(
    'tableName'   => 'navigation',
    'loadUploads' => true,
    'allowSearch' => false,
    'where'       => "depth = 0"
  ));

This will return a list of the top level items as they are the only records which will have a depth of zero.

Let me know if you have any questions.

Thanks!

Greg

Greg Thomas







PHP Programmer - interactivetools.com