lib.mainnavigation = HMENU
lib.mainnavigation {
    wrap = <nav id="mainNavigation" role="navigation"><ul>|</ul></nav>

    1 = TMENU
    1 {
        expAll = 1

        NO = 1
        NO {
            ATagBeforeWrap = 1
            linkWrap = <span>|</span>
            wrapItemAndSub  = <li>|</li>
            stdWrap.htmlSpecialChars = 1
            ATagTitle.field = abstract // description // subtitle // title
        }

        ACT = 1
        ACT < .NO
        ACT {
            wrapItemAndSub  = <li class="active">|</li>
        }

        CUR = 1
        CUR < .ACT

        IFSUB = 1
        IFSUB < .NO
        IFSUB {
            wrapItemAndSub = <li class="hasSub">|</li>
            #ATagParams = class="dropdown-toggle" data-toggle="dropdown"
            #stdWrap.noTrimWrap = || <span class="caret"></span>|
        }

        ACTIFSUB = 1
        ACTIFSUB < .IFSUB
        ACTIFSUB.wrapItemAndSub = <li class="active hasSub">|</li>

        CURIFSUB = 1
        CURIFSUB < .ACTIFSUB
    }

    2 < .1
    2 {
        wrap = <div class="sub"><div class="container"><ul class="clearfix">|</ul></div></div>

        NO {
            linkWrap >
            ATagParams = class="matchHeight"
            stdWrap.htmlSpecialChars = 0

            stdWrap.cObject = COA
            stdWrap.cObject {
                10 = FILES
                10 {
                    references {
                        table = pages
                        uid.data = field = uid
                        fieldName = media
                    }

                    begin = 0
                    maxItems = 1

                    renderObj = IMAGE
                    renderObj {
                        file.import.data = file:current:uid
                        file.treatIdAsReference = 1
                        titleText.data = file:current:title
                        altText.data = file:current:alternative
                        stdWrap.dataWrap = <span class="icon">|</span>
                    }
                }

                20 = TEXT
                20 {
                    field = title
                    wrap = <span class="text">|</span>
                    insertData = 1
                }
            }
        }

        ACT = 1
        ACT < .NO
        ACT {
            wrapItemAndSub  = <li class="active">|</li>
        }

        CUR = 1
        CUR < .ACT

        IFSUB >
        CURIFSUB >
        ACTIFSUB >

        #SPC = 1
        #SPC.allWrap = <li class="divider" role="separator">|</li>
    }
}