Romarain

GRAV EasyMenu project

Mar 5th, 2019
222
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
YAML 2.81 KB | None | 0 0
  1. # Examples
  2. user_menu_example:
  3.   displays:
  4.     level1: horizontal
  5.     level2: dropdown_left
  6.     level3: dropdown_left
  7.   root:                      # We create a first level.
  8.     item1:                       # 1rst item
  9.       URI: /home                    # The page where the link will point to. It can also be an external URL.
  10.       name: Portal                  # The name that the <a> link will display.
  11.       explore: false                # Indicates that we don't want to auto-construct a sub-menu with children, even if there might be a few sub-pages.
  12.     item2:                       # 2nd item
  13.       URI: 'http://www.mywork.fr'   # An external link. No exploration of children possible.
  14.       name: My workplace
  15.     item3:
  16.       URI: /stuffs
  17.       name: auto                    # We decide to use the title of the markdown page directly, to name the link.
  18.       explore: true                 # All children and sub-children will be deployed in a sub-menu. As we don't specify a level of deepness, all will be displayed.
  19.     item4:
  20.       URI: /house
  21.       name: auto
  22.       explore: false                # Let's say we want to build it manually !              
  23.       sub:                         # It indicates that we'll define a manual sub-menu, with specific children.
  24.         display: dropdown_right       # Individual rule for that sub-menu level, independently from the general one (in 'displays:').
  25.         item1:                       # Reminder : we're manually adding items, because of the "explore: false" above.
  26.           URI: /house/sub-page1       # URI of the page
  27.           name: 'A wonderful part of my house'
  28.           explore: false
  29.         item2:
  30.           URI: /garden/sub-item2      # A page from an other parent.
  31.           name: 'That\'s my cat'
  32.           explore: true               # I have tens of pages with pictures of my cat !
  33.     item5:                      
  34.       auto: true                    # Means that the item will be a series of items, wich will be auto-constructed to fill-in the present level.
  35.       URI: /item2                   # Path from wich pages will serve to build the items on the present level. Just a level of deepness is used.
  36.       name: auto                    # Of course we name them automatically. This option is set by default anyway, if "auto: true" is used.
  37.       explore: 2                    # We decide to display just one level of children of each item built.
  38.       level2: dropdown_right        # An other method for deciding of the display. Here, it will be applied to all children of level 2, but levels 3 will still use the general default setting.
  39.     item6:                        
  40.       URI: /contact                 # We end by a normal single link. It is naturally added after the automated item5's links.
  41.       name : auto
  42.       explore: false
Advertisement
Add Comment
Please, Sign In to add comment