if statement inside the getCategories

3 posts by 2 authors in: Forums > CMS Builder
Last Post: December 30, 2019   (RSS)

By Mikey - December 30, 2019

Howdy folks,

I'm trying to add an if statement inside the getCategories as seen below. This feature would add a css style to the the ul of a menu - if a checkbox in the site's settings is checked off. Can anyone tell me if this is possible and what I need to do to the code to get it functioning?

list($aboutRecords, $selectedCategory) = getCategories(array(
    'tableName'   => 'about',
    'categoryFormat' => 'showall',
    if ($settingsRecord['menu_1_tier'] =='1') { 'ulAttributes' => 'class="vertical menu"', }
  ));

Thanks, Zicky

By Mikey - December 30, 2019

Thanks for the help Daniel, I got this working now. : )