[TYPO3-UG Italy] Configurazione Webformat Extendedshop

Giovanni Maggini power_storm at libero.it
Sat Sep 8 18:56:15 CEST 2007


Innanzitutto ringrazio entrambi per i loro consigli.
Se avrete voglia di spendere ancora alcuni minuti per capire meglio la situazione, cercherò di essere più preciso inserendo alcuni dettagli.

Innanzitutto, il template del mio sito è strutturato nel seguente modo:
- la pagina con id=1 (rootpage) contiene un template chiamato "NEW SITE". Questo template ha nei campi Constants e Setup solo il necessario per configurare le estensioni "fe_user_register" e nel campo setup il necessario per settare la lingua del sito (per usare l'estensione -di cui non ricordo il nome- che permette la selezione della lingua con le bandierine in alto alla pagina). 
Tutto il codice necessario per la visualizzazione è contenuto in un "extension template" (che è incluso come "Static Template"), avendo creato una sysFolder chiamata "Template Storage" (seguendo le indicazioni dei tutorial nella documentazione di typo3, uno dei quali consigliava di realizzare il proprio template secondo quanto appena detto).

Prima di postare il codice del template, spiego che, dopo aver fatto alcune prove:
- installando l'estensione "extendedshop" e creando le pagine "List" , "Basket", etc con al loro interno i plugin, all'interno della pagina ho effettivamente l'output desiderato (pur senza alcuna definizione di stile, font, etc). Al momento ho inserito, ad esempio, un articolo chiamato Articolo1, e viene visualizzato nella pagina. 
- nel momento in cui cerco di inserire il codice presente nella documentazione dell'extendedshop (Constants e Setup), non ho più alcun output nella parte di pagina dove solitamente viene visualizzato il "content", mentre il resto del layout del sito è perfettamente al suo posto.

Ho provato le seguenti combinazioni: 
- creare un extension template nella pagina dello Shop (includendo e non includendo il "Base Template" del sito
- copiare e incollare direttamente il codice nei campi "Constants" e "Setup" del template "rootlevel"

Riguardo alle modifiche del codice di Mauro Lorenzutti, le uniche che ho apportato sono state
- cambiare il path dei file "shop.html" e "stileShop.css" , dopo averli copiati all'interno della mia directory fileadmin/
- cambiare gli UID delle pagine del basket, indirizzi e ordini effettuati.

Come ultima cosa, allego il SETUP del mio Base Template, sperando possa essere di aiuto (sono 310 righe)

# Configuring the Auto-Parser for main template: 
plugin.tx_automaketemplate_pi1 { 
    # Read the template file: 
  content = FILE 
  content.file = fileadmin/template1/main/modello1.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
    TABLE.all = 1 
    div.all=1
  } 
    # Prefix all relative paths with this value: 
  relPathPrefix = fileadmin/template1/main/ 
} 



###Bottom Menu cObject (code snippet http://www.typo3wizard.com/en/snippets/menus/dynamically-split-a-menu-in-2-parts.html)
###Viene copiato nel tem
lib.splitmenu = COA
lib.splitmenu {
   
  10 = HMENU
  10.special = directory
  10.special.value = 1
  10.1 = TMENU
  10.1 {
    wrap = <ul class="menu_bottom1-no"> | </ul>
    NO {
      stdWrap.cObject = COA
      stdWrap.cObject {
        10 = TEXT
        10.field = title
        if.value.data = register:count_HMENU_MENUOBJ
        if.negate = 1
        if.isLessThan.prioriCalc=1
        if.isLessThan.cObject=TEXT
        if.isLessThan.cObject.insertData=1
        if.isLessThan.cObject.value = ({register:count_menuItems}+1)/2
        wrap = <li>|</li>
      }
    }
  }
  20 < .10
  20.1.wrap = <ul class="menu_bottom2-no"> | </ul>
  20.1.NO.stdWrap.cObject.if.negate >
}

#page.200 < lib.splitmenu

###END of Bottom Menu cObject


####LEFT MENU

temp.tmenu= HMENU 
temp.tmenu.entryLevel=1
temp.tmenu {
    
  	# second level 	
  1 = TMENU
  #1.wrap = <ul class="menu_left">|</ul>
  1{
    NO{
      linkWrap = <p>|</p>
    }
    ACT=1
    ACT{
      linkWrap = <p class="menu_left_active">|</p>
    }
    #CUR=1
    #CUR{
    #  wrapItemAndSub = <li class="menu_left_current-active">|</li>
    #}
    #IFSUB=1
    #IFSUB{
    #  wrapItemAndSub = <li class="menu-level2-with-subpage">|</li>
    #}
  }
}
lib.menu_left < temp.tmenu
###########LEFT MENU END

###START of GMENU Top PARTE 1 (topmenu1)###

lib.topmenu1 = HMENU
lib.topmenu1 {
  1=GMENU 
  1.maxItems=5
  
  1 {
    wrap (

                <td width="150" height="52"><img src="fileadmin/template1/main/images/3services-3s-su.gif" width="150" height="52"></td>  
                | <td><img src="fileadmin/template1/main/images/3services_12.gif" width="84" height="52"></td>
                <td><img src="fileadmin/template1/main/images/3services_13.gif" width="224" height="52"></td>
	
     )
    NO {
      allWrap= <td> | </td> 
     
      XY= 48,52 || 90,52 || 72,52 || 45,52 || 64,52
      5=IMAGE
      5.file=fileadmin/template1/main/images/3s-home.gif || fileadmin/template1/main/images/3s-dove.gif || fileadmin/template1/main/images/3s-contatti.gif || fileadmin/template1/main/images/3s-news.jpg || fileadmin/template1/main/images/3s-offerte.jpg
      10=TEXT
      10 {
        text.field=title
        offset=12,46
        fontColor=#FFFFFF
        fontFile=fileadmin/fonts/RoSSEB28.PFB
        fontSize=10px
        align=bottom, center
        shadow {
          offset=0,0
          color=#000000
          opacity=25
          blur=50
          niceText=1
         } #chiude la shadow
         
      } #chiude il TEXT 10
       
    } # chiude il NO
     
    RO < .NO
    RO=1
    #RO.transparentBackground = 1
    RO.10.fontColor= #000000
    ACT < .RO
    ACT=1
  } #chiude GMENU 1
  
  
   
} #chiude temp.topmenu1

#page.200 < temp.topmenu1

#####END of GMENU Top parte 1###



#####START of GMENU Top PARTE 2 (topmenu2)###

lib.topmenu2 = HMENU
lib.topmenu2 {
  1=GMENU 
 # 1.maxItems=5
  1.begin=6
  1 {
    wrap (

          <td width="150" height="21"><img src="fileadmin/template1/main/images/3services-3s-giu.gif" width="150" height="21"></td>
          | <td width="122" valign="top"><img src="fileadmin/template1/main/images/spacer.gif" width="123" height="21"></td>

        
     )
    NO {
      allWrap= <td> | </td> 
     
      XY= [10.w]+10,21
      5=IMAGE
      5.file=fileadmin/template1/main/images/3s-topmenu2_sfondo.gif
      10=TEXT
      10 {
        text.field=title
        offset=3,15
        fontColor=#FFFFFF
        fontFile=fileadmin/fonts/RoSSEB28.PFB
        fontSize=11px
        align=left
        shadow {
          offset=0,0
          color=#000000
          opacity=25
          blur=50
          niceText=1
         } #chiude la shadow
         
      } #chiude il TEXT 10
       
    } # chiude il NO
     
    RO < .NO
    RO=1
    #RO.transparentBackground = 1
    RO.10.fontColor= #1BCEFB
    ACT < .RO
    ACT=1
  } #chiude GMENU 1
  
  
   
} #chiude temp.topmenu1

#page.201 < temp.topmenu2

###END of GMENU TOP parte 2 (topmenu2)###






###BEGIN languageMenu

/*
temp.languageMenu < plugin.tx_srlanguagemenu_pi1
temp.languageMenu.languagesUidsList = 0,1
temp.languageMenu.defaultLayout= 0
temp.languageMenu.defaultLanguageISOCode = IT
#marks.LANGUAGE < plugin.tx_srlanguagemenu_pi1
*/
temp.languageMenu = COA
  temp.languageMenu {
    10 = RECORDS
    10.tables = tt_content
    10.source = 57
  }
  
  
 
temp.languageMenu < plugin.tx_srlanguagemenu_pi1
temp.languageMenu.defaultLanguageISOCode = it



###END languageMenu





# 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 dynamic menu: 
  subparts.menu_bottom1 < lib.splitmenu
    # Substitute the ###content### subpart with some example content: 
  #subparts.content < styles.content.get 
   # Substitute the ###topmenu1### subpart with GMENU TOP Part 1: 
  subparts.topmenu1 < lib.topmenu1
   # Substitute the ###topmenu2### subpart with GMENU TOP Part 2: 
  subparts.topmenu2 < lib.topmenu2  
    # Substitute the ###menu_left### subpart with Menu Left: 
  subparts.menu_left < lib.menu_left  
    # Substitute the ###content### subpart with content: 
  subparts.content < styles.content.get 
    # Substitute the ###languageMenu### subpart with languageMenu	: 
  subparts.languageMenu < temp.languageMenu

} 

# 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 

#debug
#page.config.disableAllHeaderCode=1

#page.10 =< plugin.tx_automaketemplate_pi1


###BEGIN LANGUAGE SETUP

config.linkVars = L

config.typolinkLinkAccessRestrictedPages = NONE; 

config.sys_language_uid = 0
config.language = it
config.locale_all = italian
page.config.htmlTag_langKey = it

[globalVar = GP:L = 5]
config.language = en
config.locale_all = english
config.sys_language_uid = 5
page.config.htmlTag_langKey = en
[global]

###END LANGUAGE SETUP


Vi ringrazio ancora per l'aiuto

Giovanni Maggini






------------------------------------------------------
Leggi GRATIS le tue mail con il telefonino i-mode™ di Wind
http://i-mode.wind.it/



More information about the TYPO3-UG-italy mailing list