[TYPO3-english] Example of Menu is bad

Juan barreto juank01 at gmail.com
Sat Jun 18 01:22:12 CEST 2011


Hello,
I am new to typo3 and I'm doing the tutorial of portal (http://
typo3.org/documentation/document-library/tutorials/), but when I am in
the section of the menu not working the  example.

Template:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Hola</title>
</head>
<body bgcolor="#fff">
 <table border="0">
   <tr>
       <td id="header_1"></td>
   </tr>
   <tr>
       <td id="menu_1">
        <div class="menu1-level1-no">  <a href="#" >Ite1</a>  </div>
        <div class="menu1-level1-act">  <a href="#" >Ite1</a>  </div>
        <div class="menu1-level2-act">  <a href="#" >Ite1</a>  </div>
        <div class="menu1-level2-no">  <a href="#" >Ite1</a>  </div>
</td>
       <td id="content">Hello word</td>
   </tr>
   <tr>
       <td id="footer">Hello word</td>
   <tr>
</body>
</html>


Setup:

# Configuring the Auto-Parser for main template:

plugin.tx_automaketemplate_pi1 {

   # Read the template file:

 content = FILE

 content.file = fileadmin/template/template.html

   # 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

   TD.all = 1

 }

   # Prefix all relative paths with this value:

 relPathPrefix = fileadmin/template/

}

# Menu 1 cObject

temp.menu_1 = HMENU

 # First level menu-object, textual

temp.menu_1.1 = TMENU

temp.menu_1.1 {

   # Propiedades del estado Normal

 NO.allWrap = <div class="menu1-level1-no"> | </div>

   # Enable active state and set properties:

 ACT = 1

 ACT.allWrap = <div class="menu1-level1-act"> | </div>

}

 # Objeto de menú de segundo nivel, textual

temp.menu_1.2 = TMENU

temp.menu_1.2 {

   # Propiedades del estado normal:

 NO.allWrap = <div class="menu1-level2-no"> | </div>

   # Activar el estado activo y definir propiedades:

 ACT = 1

 ACT.allWrap = <div class="menu1-level2-act"> | </div>

}

# Main TEMPLATE cObject for the 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 ###content### subpart with some example content:
# Sustituye la subparte ###menu_1### por el menú dinámico:

 subparts.menu_1 < temp.menu_1

 subparts.content = TEXT

 subparts.content.value = HELLO WORLD - CONTENT

}

# Main TEMPLATE cObject for the 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

}

# 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.10  < temp.headTemplate



Note: I sorry for my English, I'm using google...jeje



-- 
Juan Carlos Barreto
Lider en Área de Servicios
Ing en Sistemas
Universidad del Valle
Tel: 311 750 0420
juank01 at gmail.com
jcbarreto at vianet.ws


More information about the TYPO3-english mailing list