[TYPO3-UG Italy] (no subject)

simonadim at inwind.it simonadim at inwind.it
Thu Sep 7 17:33:35 CEST 2006


Salve,
è la prima volta che dopo giorni di studio mi blocco, quindi provo a chiedere aiuto!!!
Sto studiando il typo3, e sono arrivata al Modern Template Building-1. Ho provato tutti gli esempi per l'integrazione del template esistente, e man mano commentavo i listati precedenti nella textarea del Setup del template, per provare nuove funzionalità.
Sono arrivata al punto in cui si inseriscono gli oggetti del menù, eppure ho anche inserito il codice prima della definizione  di "temp.mainTemplate" ma non funziona!!!
( # Menu 1 cObject )
Perchè...non capisco la causa....
Thx in anticipo

# Questo inserirà un cObject di tipo "TEMPLATE" nella posizione "page.10". 
# La proprietà 'file' dell'oggetto TEMPLATE legge il file creato, "fileadmin/template/test.html".
# e restituisce la riga: 


/ temp.mainTemplate = TEMPLATE 
/ temp.mainTemplate { 
/ template = FILE
/ template.file = fileadmin/template/test.html
/ } 
/ page = PAGE 
/ page.typeNum = 0 
/ page.10 < temp.mainTemplate 



# l'oggetto TEMPLATE lavora solo sulla sotto-parte "###DOCUMENT_BODY###" 
# la sotto-parte  "###INSIDE_HEADER###" è stata sostituita 
#  con il contenuto restituito dall'oggetto TEXT cObject 
#  definito per la proprietà "subparts.INSIDE_HEADER" dell'oggetto TEMPLATE 


/ temp.mainTemplate = TEMPLATE 
/ temp.mainTemplate { 
/ template = FILE
/   template.file = fileadmin/template/test.html
/   workOnSubpart = DOCUMENT_BODY
/   subparts.INSIDE_HEADER = TEXT
/   subparts.INSIDE_HEADER.value = HELLO WORLD!
/ } 


/ page = PAGE 
/ page.typeNum = 0 
/ page.10 < temp.mainTemplate


# *** Plugin Auto-Parser ***

# Il plugin, dato un file html:
#  	1) definisce le aree header e body come sottoparti
#  	2) imposta il percorso assoluto dei file css, immagini ecc.
# il file html risultante:
# 	1) mostrerà dei commenti html contenenti tag(### + nome_tag) che delimitano tali parti
#	   (che saranno utilizzate per localizzare i contenuti dinamici)
# 	2) i percorsi dei file sono corretti
 

# Configuring the Auto-Parser: 


plugin.tx_automaketemplate_pi1 { 

  # Read the template file:

  content = FILE
  content.file = fileadmin/template/main/template_1.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
  }

 
  # N:B:: Prefix all relative paths with this value:

  relPathPrefix = fileadmin/template/main/

} 


########
# Menu 1 cObject 

temp.menu_1 = HMENU 

  # First level menu-object, textual
temp.menu_1.1 = TMENU 

temp.menu_1.1 { 
  # Normal state properties
  NO.allWrap = <div class="menu1-level1-no"> | </div>
  # Enable active state and set properties:
  ACT = 1
  ACT.allWrap = <div class="menu1-level1-act"> | </div>
} 

  # Second level menu-object, textual
temp.menu_1.2 = TMENU 

temp.menu_1.2 { 

    # Normal state properties
  NO.allWrap = <div class="menu1-level2-no"> | </div>
    # Enable active state and set properties:
  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 ###menu_1### subpart with some example content:
  	# subparts.menu_1 = TEXT
  	# subparts.menu_1.value = HELLO WORLD - MENU
  	subparts.menu_1 < temp.menu_1

 
    # Substitute the ###content### subpart with some example content:
  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








More information about the TYPO3-UG-italy mailing list