Takes 5 parameters, Location, Mode, Title, Element, Class


Use EnsureNavFields to Ensure the list of Fields that the HtmlDropdown command uses exist in the Query. Typically, you would have setup the Query to contain all of the information you wish to use to build a menu with ahead of time, then call EnsureNavFields, and then Set or Build your data into each of the Nav Fields. At the moment, the fields are:

* **Nav.Header** *- An optional Header Group with each item in the Group having the same value, or a single - on just one item to insert a divider with no text based header*
* **Nav.URL** *- URL the Nav Item will link to*
* **Nav.Active** *- True/False flag to auto-add the 'active' class to the item*
* **Nav.Class** *- Optional class(es) to use for this

  • item*
    * **Nav.NewTab** *- If True (not blank) will set URL to open in a new Tab/Window*
    * **Nav.Content** *- Typically just the text to show to the user for the that item, but may contain more complex output such as buttons or even forms etc.*

    Once you have a Query with the above Fields in it and all of the values set as you wish, use the HtmlDropdown command to place the Dropdown on the page.

    The syntax options for the HtmlDropdown command is as follows:

    HtmlDropdown Location, Mode, Title, Element, Class
    HtmlDropdown Location, Mode, Title, Element, [""]
    HtmlDropdown Location, ["Append"], Title, Element, [""]
    HtmlDropdown ["Runtime"], ["Append"], Title, Element, [""]
    HtmlDropdown ["Runtime"], ["Append"], Title, ["a"], [""]
    HtmlDropdown ["Runtime"], ["Append"], [""], ["a"], [""]

    Like the Location and Mode Parameters for other Html commands, if these Parameters are specified but left blank they will be populated with "Runtime" and "Append" respectfully.

    The Title parameter is the text that will be used as the dropdown link or button beside the carrot.

    The Element parameter is typically either "a" or "button". This value will be used as the opening and closing HTML tag that is used to trigger the dropdown.

    The Class parameter does not have any built in & values, and defaults to setting the class for the

      . If blank, it defaults to "dropdown-menu", if setting this parameter yourself, you likely need to include this default in addition to your own classes. This parameter supports the name/value pairs to specify unique class values for the element and ul (note that since what HTML element is used is based on the element parameter, the actual name to use is element: e.g. "element='dropdown-toggle myclass'")

      *Note: this new command is only designed for use with Bootstrap Templates. However, they will still produce output for non-Bootstrap Templates that may nonetheless be useful.*