-
Notifications
You must be signed in to change notification settings - Fork 0
JSON: templates
rogerlos edited this page Jun 16, 2017
·
20 revisions
This file contains an array of template objects.
The 'struct' part of the template object is either a string (for the bits surrounding the menu) or a keyed-array of similar strings within one of the lvl objects.
This string simply tells Flexwalker when to open and to close tags, using the id of a tag within tags.json. There is one reserved word, 'walker', which inserts the wp_nav_menu return when used in the top struct. Otherwise, the string is a nesting key, with '/' used to close the last opened tag. In pseudo code, using the id as the tag, this struct:
nav toggle toggleicon / / walker /
Turns into this code
<nav>
<toggle>
<toggleicon></toggleicon>
</toggle>
<!-- returned menu from Flexwalker_Walker -->
</nav>
Note that within the lvl objects, there are opening and close structs for 'lvl' and 'el'. See below for an explanation of how they work.