{module_catalogueselect}

Description

Renders an option list of catalogs to be used in a catalog list dropdown.

Syntax

{module_catalogueselect parentId="-1" collection="my_custom_collection_name" template=""}

Note: When using named parameters always wrap the individual parameters in double quotes. Also, do note that modules using named parameters do not work for campaigns just yet.

Parameters

This module can be rendered:

  • as aregular drop down - the module outputs the option tags, to use it wrap it into a select like this:
    <select>{module_catalogueselect}</select>
  • using Liquid collections - you can create an object representation of your catalog tree like this:
        
      "catalogue": {
        "moduleName": "catalogueselect",
        "moduleDescriptor": {
          "templatePath": "",
          "parameters": "collection=\"catalogue\"",
          "apiEndpoint": "/api/v3/catalogueselect",
          "objectType": "-1",
          "objectId": "-1",
          "adminUrl": ""
        },
        "items": [
          {
            "id": 25479,
            "name": "Classic Boutique",
            "items": [
              {
                "id": 270280,
                "name": "Special perfumes"
              }
            ]
          },
          {
            "id": 26077,
            "name": "Designer Brands"
          },
          {
            "id": 25482,
            "name": "Spicy Perfumes"
          },
          {
            "id": 25481,
            "name": "Woody Perfumes"
          }
        ]
      }
        
        

Examples

When using this module always wrap it in a select tag like so:


<select>
{module_catalogueselect}
</select>

It will output a drop down containing the catalogs on your site


<select>
<option value="-1">-- All Catalogs --</option>
<option value="25479">Classic Boutique</option>
<option value="26077">Designer Brands</option>
<option value="25482">Spicy Perfumes</option
<option value="25481">Woody Perfumes</option>
</select>

Syntax

{module_catalogueselect,parent}

Parameters

  • parent - the ID of the parent catalog, default is -1 (the select contains all the catalogs)

Layouts

This module is not rendered with a layout.

Examples

When using this module always wrap it in a select tag like so:


<select>
{module_catalogueselect}
</select>

It will output a drop down containing the catalogs on your site


<select>
<option value="-1">-- All Catalogs --</option>
<option value="25479">Classic Boutique</option>
<option value="26077">Designer Brands</option>
<option value="25482">Spicy Perfumes</option
<option value="25481">Woody Perfumes</option>
</select>