####################
 #PARSING du template
####################

# Configuring the Auto-Parser:
plugin.tx_automaketemplate_pi1 {
    # Read the template file:
  content < plugin.tx_rlmptmplselector_pi1

    # Here we define which elements in the HTML that
    # should be wrapped in subpart-comments:
  elements {
    BODY.all = 1
    BODY.all.subpartMarker = DOCUMENT_BODY
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
    HEAD.rmTagSections = title

    UL.class.menu-container = 1

    DIV.id.submenu-container = 1
	DIV.id.submenu-container.includeWrappingTag = 1

    DIV.class.categorie-module-content = 1
    H1.class.categorie-module-title = 1

    DIV.id.contentsection = 1

    #right content
    DIV.id.right-content = 1

    DIV.class.block-header = 1
    DIV.class.block-content = 1

    DIV.class.rightcontentsection = 1
	DIV.class.rightcontentsection.includeWrappingTag = 1
  }
    # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/template/main/
}


####################
#MENU PRINCIPAL
####################

# menu-container cObject
temp.menu-container = HMENU
  # First level menu-object, textual
temp.menu-container.1 = TMENU
temp.menu-container.1 {
  noBlur = 1
    # Normal state properties
  NO {
    stdWrap.htmlSpecialChars = 1
    ATagParams.field = alias
    ATagParams.wrap = id=" | " class="normal"
    allWrap = <li> | </li>
  }
  # Enable active state and set properties:
  ACT = 1
  ACT {
    stdWrap.htmlSpecialChars = 1
    ATagParams.field = alias
    ATagParams.wrap = id=" | " class="active"
    allWrap = <li> | </li>
  }
}

####################
#MENU SECONDAIRE
####################

# submenu-container cObject
temp.submenu-container = HMENU
temp.submenu-container {
	entryLevel = 1
	# second level submenu-object, textual
	1 = TMENU
	1 {
		noBlur = 1
		    # Normal state properties
		NO.allWrap = <li> | </li>
		    # Enable active state and set properties:
		ACT = 1
		ACT{
		    allWrap = <li> | </li>
		    linkWrap = <b> | </b>
		}
		wrap = <div id="submenu-container"><ul class="submenu-container"> | </ul></div>
	}
}

####################
#TROISIEME MENU
####################

# thirdmenu-container cObject
temp.thirdmenu-container = HMENU
temp.thirdmenu-container.entryLevel = 2
  # third levelsubmenu-object, textual
temp.thirdmenu-container.1 = TMENU
temp.thirdmenu-container.1 {
  noBlur = 1
    # Normal state properties
  NO.allWrap = <li> | </li>
    # Enable active state and set properties:
  ACT = 1
  ACT{
    allWrap = <li> | </li>
    linkWrap = <b> | </b>
  }
  wrap = <ul class="thirdmenu-container"> | </ul>
}

####################
# MAIN TEMPLATE cOBJECT FOR HEAD
####################
temp.headTemplate = TEMPLATE
temp.headTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template =< plugin.tx_automaketemplate_pi1
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}
####################
# MAIN TEMPLATE cOBJECT FOR CONTENT AREA
####################
temp.contentArea = TEMPLATE
temp.contentArea {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
    # CREATES A COPY since we need to manipulate some properties!
  	template < plugin.tx_automaketemplate_pi1

    # Reconfigurating the "tmplselect" plugin to select from the
    # "conten area templates " in sub/ folder instead of main templates:
  	template.content.templateType = sub

    # Since the template files are now located in another path
    # the relative prefix must be changed as well:
  	template.relPathPrefix = fileadmin/template/sub/

    # Clears the "elements" property:
	template.elements >



    # Sets the DIV and TD elements to be wrapped in subparts:
    # Wrap the header section but remove <title> and <style> sections:
  	template.elements {
  		BODY.all = 1
    		BODY.all.subpartMarker = DOCUMENT_BODY
		HEAD.all = 1
		HEAD.all.subpartMarker = DOCUMENT_HEADER
		HEAD.rmTagSections = title
		DIV.id.thirdmenu-container = 1
		DIV.class.module-content = 1
    		H1.class.module-title = 1
  	}


	# Select only the content of the <div id="contentsection"> element
	workOnSubpart = DOCUMENT_BODY

	# Substitute the ###thirdmenu-container### subpart
  	subparts.thirdmenu-container < temp.thirdmenu-container

	subparts.module-title = TEXT
	subparts.module-title.ifEmpty.field = title
	subparts.module-title.field = nav_title
	subparts.module-content < styles.content.get
}

####################
# MAIN TEMPLATE cOBJECT FOR HEAD ON CONTENT AREA
####################
temp.headTemplateCA = TEMPLATE
temp.headTemplateCA {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template < temp.contentArea.template
    # Select only the content between the <head>-tags
  workOnSubpart = DOCUMENT_HEADER
}

[treeLevel=0]
temp.news = TEMPLATE
temp.news {
	template =< plugin.tx_automaketemplate_pi1
	workOnSubpart = right-content

	subparts.block-header = TEXT
	subparts.block-header{
		value = News
		wrap = <h1 class="module-title"> | </h1>
	}
	subparts.block-content < plugin.tx_mininews_pi1
	subparts.block-content {
		CMD = FP
		pidList = 80
		templateObject = 5
		frontPage.results_at_a_time = {$site.home_news.nb}
		frontPage.archivePid = 80
	}
}
[end]

####################
# MAIN TEMPLATE cOBJECT FOR BODY
####################
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
    # Feeding the content from the Auto-parser to the TEMPLATE cObject:
  template < plugin.tx_automaketemplate_pi1

    # Select only the content between the <body>-tags
  workOnSubpart = DOCUMENT_BODY
    # Substitute the ###menu-container### subpart
  subparts.menu-container < temp.menu-container
    # Substitute the ###submenu-container### subpart
  subparts.submenu-container < temp.submenu-container

    # Substitute the ###contentsection ### subpart
  subparts.contentsection < temp.contentArea

  subparts.rightcontentsection = COA
  subparts.rightcontentsection {
	10 < temp.news
	20 = TEXT
	20 < styles.content.getRight
	20.wrap = <div class="rightcontentsection"><div class="block-header"><h1 class="module-title">Programme</h1></div><div class="block-content"> | </div><div class="block-footer"></div></div>
  }


  # Substitute the ###catgegorie content section ### subpart
  subparts.categorie-module-title = TEXT
  subparts.categorie-module-title.field = subtitle
  subparts.categorie-module-title.ifEmpty.field = title
  subparts.categorie-module-content < styles.content.getBorder
}


# Default PAGE object:
page = PAGE
page.typeNum = 0
# Copying the content from TEMPLATE for <body>-section:
page.10 < temp.mainTemplate
# Copying the content from TEMPLATE for <head>-section:
page.headerData.20 < temp.headTemplate
page.headerData.30 < temp.headTemplateCA

