Ajax Content Blog Categories

This article covers the methods provided for Content Categories by the Aurora Ajax Library.

Ajax Method Group: Ajax_Frontend_Content_Blog_Categories

find

Overview

Permission Required: None

Method Call: /ajax/Ajax_Frontend_Content_Blog_Categories/find

📘

This method returns a recordset containing all Content Categories based on a range of conditions.

Method Description

Method specific parameters

ParameterValuesDefaultDescriptionRequired
language_isoStringDefaults to Aurora Default LanguageThe Language ISO as configured in the Aurora Back-end under Store > Configure > Languages.No
Non-negative Integer0The Internal ID Aurora uses to identify a Content Category.

This is the ID of the Content Category you would like to retrieve the children for, i.e. setting this field will not return he Content Category with this ID, but the categories within the Content Category with this ID.

Set this to 0 (zero) in order to fetch the 'root' Content Categories.
No
pageNon-negative Integer1The number of the page of results you would like to have returned.

The number of items returned per page defaults to the value specified in the "Posts per page" setting located under Store -> Settings -> Blog, but can be overridden using the "items_per_page" parameter if desired.
No
items_per_pagePositive Integer"Posts per page" setting located under Store > Settings > BlogThe number of content items to return per page.

This should be used to retrieve a particular number of items instead of any 'limit' variable. So if you require a list of 50 Content Items, then simply set this to 50 and do not provide a 'page' value (or do provide a 'page' value but set it to 1).
No
order_by_ascendingBooleantrueIf set to 'false', then the categories are returned in Descending order, otherwise they are return in Ascending order.

This method will return categories in alphabetical order, delivering A-Z by default.
No

Data Returned

The data returned by this method is delivered as a Json encoded array of values, as described below.

Method specific parameters

VariableValuesDescription
items
Array( content_category )This is an indexed array of content_category records.

For more details regarding the fields available here, please see the content_category variable in the Blog Functions article.

Common fields

VariableValuesDescription
more_availableBooleanIf there are more Content Items to be returned after the current record set that were not return due to paging or some other limit, then this will be true. Otherwise it is false.

This is commonly used for deciding whether or not to show the "Next Page" link when listing Content Items.
total_itemsNon-negative IntegerThe total number of Content Items that matched the request made, regardless of any paging or limits in force.

This is commonly used for showing how many results there are matching a particular query/search when paging, e.g. "1-20 of 650" where 650 is the value returned within the total_items variable.
number_of_pagesNon-negative IntegerThe total number of pages of results based on the current settings used for the original request.

This is most useful when simply using the default value for items_per_page, so that your calling script(s) can generate their paging as needed, without the need to know the specifics about the limits in play.