New Feature: Custom Limits for Lists of OSCampus Classes and Pathways

OSCampus Pro

We are happy to announce that we implemented another useful feature in our OSCampus Pro 1.2.4.

You can now set your own custom limits for the lists of displayed OSCampus classes. 

Previously, this limit was automatically set to the value set in your Joomla's Global Configuration.

In this blog post, you will take a look at this new feature.

What is a list limit?

The best place to demonstrate what a list limit is and how it works is Joomla itself.

For the purpose of my demonstration, I am using a vanilla Joomla installation with the Sample Content.

  • In your Joomla control panel, go to Menus > Top > Add New Menu Item:

add new menu item

  • You will be taken to the Menus: Menu Item screen. Click Select:

click select

You will see the Menu Item Types modal box. 

  1. Click Articles.
  2. Click Category List:

click articles category list

  • Find the Choose a Category setting and click its Select button. 

select category button

You will see the Select or Change Category modal box. 

  • Click on a category title. For my demonstration, I clicked on Joomla:

select the joomla category

  • Click on the List Layout tab:

click list layout tab

  1. Scroll down to the # Articles to List setting.
  2. Take notice that this parameter is set to 10 articles to list:

scroll down to articles to list

  1. Enter a title into the Menu Title field. I entered Joomla for my demonstration.
  2. Click Save.

enter title click save

  • Go to your site front end. You will see only 10 articles listed on the page:

list of articles limited to 10 per page

This is exactly the number you just saw under the List Layout tab > # Article to List parameter a few seconds ago.

  • Go back to the List Layout tab.
  • Click on the # Articles to List setting.
  • Set it to 5. 
  • Click Save.

If you check the front end of your site now and refresh the page, you will see only 5 articles listed:

only five articles listed

This is how a list limit setting works. It just controls how many items will be listed on a single page. 

The new feature

Lists limits for OSCampus versions prior to 1.2.4 were set automatically. You didn't have control over them.

They were set based on the value set in the Default List Limit parameter under Global Configuration:

default list limit in global configuration

Starting from OSCampus version 1.2.4, you can now set your own limits for:

  1. A list of pathways.
  2. A list of classes of a single pathway.

You set limits for both of these lists in their menu items.

Let's, for example, take a look at how to set a limit for a list of pathways.

For the purpose of this example, I created 16 sample pathways:

list of nineteen pathways

We would like our front end list of pathways to be limited to displaying only 10 pathways on a single page.

  • Go to Menus > Top > Add New Menu Item.
  • Click Select.

You will the Menu Item Type modal box.

  1. Click OSCampus Pro.
  2. Click Pathways:

click oscampus pro click pathways

  • Click on the Options tab:

click options tab

  1. Click on the OSCampus Default.
  2. Click 10.
  3. Enter Pathway into the Menu Title field.
  4. Click Save & Close:

set the limit to ten click save

Check your site frontend. You will see that the list of displayed pathways now is limited to ten:

frontend list limited to ten pathways

If you wish to set a limit to displayed classes, repeat the same steps to create a menu item by the Pathway type.


Video guide to OSCampus


What's Next?

Save over 60% when you sign up for the Everything Club today! You will get access to OSCampus Pro as well as all our other extensions, templates, and Joomla training.