#####################################
#### ONEPAGE: EXTENSION TEMPLATE ####
#####################################
<INCLUDE_TYPOSCRIPT: source="FILE:EXT:bootstrap_package/Configuration/TypoScript/setup.txt">


############################
#### ONEPAGE NAVIGATION ####
############################
lib.navigation.main >
lib.navigation.main = COA
lib.navigation.main {
	10 = HMENU
	10 {
		excludeDoktypes = 6,7,199,254,255
		1 = TMENU
		1 {
			wrap = <ul class="nav navbar-nav navbar-main">|</ul>
			expAll = 1
			noBlur = 1
			NO = 1
			NO {
				doNotLinkIt = 1
				wrapItemAndSub = <li>|</li>
				stdWrap.cObject = CASE
				stdWrap.cObject {
					key.field = doktype
					default = COA
					default {
						20 = TEXT
						20 {
							typolink {
								parameter.data = TSFE:id
								section {
									field = alias
									ifEmpty = p{field:uid}
									ifEmpty.insertData = 1
								}
								title.field = abstract // description // title
								ATagBeforeWrap = 1
								wrap = |<span class="bar"></span>
							}
							field = nav_title // title
						}
					}
					3 = TEXT
					3 {
						field = nav_title // title
						typolink {
							parameter.field = url
							title.field = abstract // description // title
							ATagBeforeWrap = 1
							wrap = |<span class="bar"></span>
						}
					}
				}
			}
			IFSUB = 1
			IFSUB {
				wrapItemAndSub = <li>|</li>
				doNotLinkIt = 1
				allWrap = <a href="#" class="dropdown-toggle" data-toggle="dropdown">|<span class="bar"></span><b class="caret"></b></a>
				wrapItemAndSub = <li class="dropdown">|</li>
			}
		}
		2 < .1
		2 {
			wrap = <ul class="dropdown-menu">|</ul>
			SPC = 1
			SPC {
				wrapItemAndSub = <li class="divider"></li><li class="dropdown-header">|</li>
			}
			IFSUB >
		}
	}
}
lib.navigation.subnavigation >


#########################
#### ONEPAGE CONTENT ####
#########################
lib.content.onepage = COA
lib.content.onepage {
	20 = HMENU
	20 {
		excludeDoktypes < lib.navigation.main.10.excludeDoktypes
		1 = TMENU
		1 {
			expAll = 1
			noBlur = 1
			NO = 1
			NO {
				doNotLinkIt = 1
				doNotShowLink = 1
				stdWrap2 {
					cObject = COA
					cObject {
						10 = LOAD_REGISTER
						10 {
							curentPageId.cObject = TEXT
							curentPageId.cObject {
								field = uid
							}
							sectionID.cObject = TEXT
							sectionID.cObject {
								field = alias
								ifEmpty = p{field:uid}
								ifEmpty.insertData = 1
							}
							pageClass.cObject < lib.page.class
						}
						20 < page.10
						20 {
							variables {
								showHeader.value = 0
								showFooter.value = 0
							}
						}
						wrap = <section id="{register:sectionID}" class="{register:pageClass}">|</section>
						wrap.insertData = 1
					}
				}
				wrapItemAndSub = |
			}
		}
		2 < .1
	}
	90 = RESTORE_REGISTER
}


###############################
#### ONEPAGE PAGE SETTINGS ####
###############################
page {
	10 {
		variables {
			onePage = TEXT
			onePage.value = 1
		}
	}
}


########################
#### PAGETYPE POPUP ####
########################
popup < page
popup {
	typeNum = 1000
	10 {
		variables {
			showHeader.value = 0
			showFooter.value = 0
		}
	}
}
