The Gravstrap Dropdown shortcode handles the Bootstrap dropdown component. Here is a live example:

The dropdown shortcode, shown above, is defined by the following definition:

[g-dropdown name=dropdown1 label="Dropdown"]
    [g-dropdown-item icon_type="fontawesome"]
        [g-link url="" menu="Products" icon="cog"][/g-link]
        [g-link url="" menu="Contacts" icon="gavel"][/g-link]

Shortcode parameters

The [bootstrap-dropdown] shortcode has some optional parameters:

  • name - defines an unique component name.
  • label - defines dropdown label.
  • type - defines the dropdown type and could be one of the following values: primary|success|info|warning|danger|link|default.
  • dropup - makes the dropdown act as a dropup. Valid values are true|false.

The [bootstrap-dropdown-item] shortcode that defines each dropdown inte has the following parameters:

  • icon_type - sets the given icon set type for all the children items. By default it displays glypicons icons and accepts fontawesome as alternative icon set.
  • attributes - defines extra attributes you can add to your shortcode. Attributes is a string of HTML key:value tokens, separated by commas. A valid attributes value is attributes=class:myclass, rel:my-rel".

You can get detailed information about the link shortcode in this document.

Next Post Previous Post