Knowledgebase: Elevated X CMS > User Manual
Separate Categories on Members Index Page
Posted by Mark [Elevated X Support] on 25 January 2017 01:28 PM

Similar to the Tour Sections functionality that is present in the CMS, it is possible to also display separate categories on your index page.

The setup process for this is not as straightforward as it is on the tour, but you should be able to get a similar result.

1. Under the sprocket, choose "Global Settings"

2. Scroll down to the Index.php Config Options heading.

3. The setting you'll want to edit here is called "Separate Category List"

The format for this field here is:


Where FOLDERNAME is the template folder you are using, and ID is the category id you're using.



This allows for separate templates to have separate category listings.

4. Once you are done with these changes, click "Save Changes"

PHP Metadata Information

If you are a designer that is looking to loop through the separate lists on your index page, the variable that you're using on the tour is called $setgroups.

You can loop through each section by doing:

<?php foreach($setgroups as $setgroup) { ?>

<?php } ?>

And subsequently, you can loop through the scenes assigned to this section by doing:

<?php foreach($setgroups as $setgroup) { ?>
Category Name: <?= $setgroup["name"] ?>

   <?php foreach($setgroup["sets"] as $set) { ?>
     Scene name: <?= $set["Title"] ?>
   <?php } ?>
<?php } ?>

You can also reference each category section individually by using $setgroups[0], $setgroups[1], etc. This is useful if you are looking to have separate design elements for each section.

As listed before, cms_defaults/4.0/cms_admin/phptemplate/site0/index.tpl should have a reference implementation that you can use as a starting point for implementing this functionality on your website. If you are using a default design, this functionality should be available out of the box.

(0 vote(s))
Not helpful

Comments (0)