config.activity_edit.item_search.toolbar.search - Initialization - Author API

Author API Initialization

search

Configuration option for the search toolbar in the Activity editor.

Values

Attribute path config.activity_edit.item_search.toolbar.search

Type object

Properties

  • show boolean

    Controls whether the search interface is displayed.

    You would want to use this to hide the Item search functionality when editing an Activity.

    Default: true

    // Hide the search functionality
                var initializationOptions = {
                    "config": {
                        "activity_edit": {
                            "item_search": {
                                "toolbar": {
                                    "search": {
                                        "show": false
                                    }
                                }
                            }
                        }
                    }
                };
                
  • controls array[string]

    Control whether the author can search by the Item reference, Item content, or Item title.

    You would want to use this to restrict the Item search functionality.

    Default: ["reference", "content"]

    // Only allow authors to search by Item content
                var initializationOptions = {
                    "config": {
                        "activity_edit": {
                            "item_search": {
                                "toolbar": {
                                    "search": {
                                        "controls": ["content"]
                                    }
                                }
                            }
                        }
                    }
                };
                

    Possible values

    • "content"
    • "reference"

      This option can be used if the title.show initialization option is set to false, or when both title.show_reference and title.show are set to true.

    • "title"

      This option can be used if Items are configured to show their title with the title.show initialization option set to true.

  • widget_type boolean

    Controls whether the author can search by Widget types.

    You would want to use this to disable the search by Widget type functionality.

    Default: true

    // Disable Widget search functionality
                var initializationOptions = {
                    "config": {
                        "activity_edit": {
                            "item_search": {
                                "toolbar": {
                                    "search": {
                                        "widget_type": false
                                    }
                                }
                            }
                        }
                    }
                };
                
  • tags object

    Configuration option for the Tag search.

    • show boolean

      Controls whether the search by Tags is available.

      You would want to use this to disable the search by Tags functionality.

      Default: true

      // Disable Tag search functionality
                                          var initializationOptions = {
                                              "config": {
                                                  "activity_edit": {
                                                      "item_search": {
                                                          "toolbar": {
                                                              "search": {
                                                                  "tags": {
                                                                      "show": false
                                                                  }
                                                              }
                                                          }
                                                      }
                                                  }
                                              }
                                          };
                                          
Was this article helpful?

Did you arrive here by accident? If so, learn more about Learnosity.