Separate Categories on Members Index Page Print

  • 0

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:

FOLDERNAME=ID,ID,ID|FOLDERNAME=ID,ID,ID

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

Examples:

site0=4,5
site0=4,5|site1=5,6

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.


Was this answer helpful?

« Back

This site uses cookies to personalize content and to analyze traffic. You consent to our cookies if you continue to use our website. Read our Privacy Policy to learn more. Please Agree or Exit