HtmlDropdown

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

Usage:
Location, Mode, Title, Element, Class
Location, Mode, Title, Element, [""]
Location, ["Append"], Title, Element, [""]
["Runtime"], ["Append"], Title, Element, [""]
["Runtime"], ["Append"], Title, ["button"], [""]
["Runtime"], ["Append"], [""], ["button"], [""]

Description:

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:

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.

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 HTML tag that is used to trigger the dropdown, and defaults to "button" if blank.

If Element is set to "navbar" then the dropdown will be organized to fit as a dropdown menu within an HtmlNav or HtmlNavbar, positioned by using a template insertion point as the Nav.Content for the target item. When using this approach with Bootstrap v5, the Nav.Class field of the target Nav or Navbar item should be set to "nav-item dropdown".

The Class parameter may use a prefix of & in order to prepend the Bootstrap button classes, such that "&primary" will result in the classes of "btn btn-primary dropdown-toggle".

If the Class parameter is blank, it defaults to the classes required by either Bootstrap v3 or v5 depending on the template:

The Class of the UL tag does not typically need to be modified, and defaults to dropdown-menu. If this needs to be changed, the Class parameter may use name=value pairs for element and ul, such as "element='dropdown-toggle myClass' ul='dropdown-menu my2ndClass'"