Categories Dropdown


This component is a dropdown selector for categories.

There are two ways to use it:

  • You can use it on its own and listen to its events to update the view, or
  • You can link it to the categories component. Doing this either updates this component when a category is clicked in the categories component, or updates the categories component when this component has values selected.


Create the component like this:

var categoriesDropdown = sdk.component('categoriesDropdown', target:String, options:Object);


By default, this component looks like this:


This is the HTML component. For example, the "#inbenta" target is:

<div id="inbenta"></div>


Available options to set in this component

Name Type Default Description
selectedCategory integer 0 Active category
baseCategory integer 0 Starting point of the category tree

Default options object

  selectedCategory: 0,
  baseCategory: 0


The following methods can be used in this component:

Name Description
setSelectedCategory(category: integer) Set the active category
setBaseCategory(category: integer) Set the base category


This component does not have any subcomponents.


Events to listen on this component:

Name Event data Description
categoryId integer Active category


This component does not track any data.


Labels of this component. The default labels of each component can be rewritten in the SDK creation configuration.

Name Default Description
CATEGORIES_DROPDOWN_TITLE Categories HTML for categories sidebar title
CATEGORIES_DROPDOWN_PLACEHOLDER Choose category HTML for categories dropdown placeholder


Create sidebar and categories components and link them.

var categoriesDropdown = sdk.component('categoriesDropdown', '#sidebar');
var categories = sdk.component('categories', '#categories');

Strict Standards: Only variables should be passed by reference in /var/www/html/src/Controllers/MarkdownController.php on line 73

Strict Standards: Only variables should be passed by reference in /var/www/html/src/Controllers/MarkdownController.php on line 73