Zum Inhalt springen

Überschrift und Content getrennt anzeigen

Erstellt am 31. August 2006 · Noch keine Antworten

Tags: Inhaltselemente, Frage

MrTwister ·

Hi,
habe hier bereits folgende Lösung gefunden:
#232681
Allerdings funktioniert sie an einigen Stellen nicht.
Die Variable im HTML Template wird einfach nicht mit der Überschrift belegt. Der Content wird jedoch richtig zugeordnet und angezeigt.

Einzigster Fall bei dem es funktioniert ist bei "topboxheader". Hier werden Content und Überschrift zugewiesen und richtig angezeigt.

Da ich noch typo Anfänger bin, evtl. findet ihr ja noch Dinge die ich hier sehr umständlich gelöst habe.
Die Seite könnt ihr euch hier anschaun: http://inbits.de/home/index.php

Bin für jeden Hinweis dankbar.

Gruß MrTwister

Hier mein TS-Code:

  ######################################################
  # Konfiguration Automake Template Plugin - Frontpage #
  ######################################################
	
plugin.tx_automaketemplate_pi1 {
    # Template einlesen
  content = FILE
  content.file = fileadmin/template/frontpage/index.html
	
    # Zu kommentierende Abschnitte (nur 2teilige Tags z.B. <a>...</a> - UPPERCASE!)
    # elements.[tag].all
    # elements.[tag].id.[value]
    # elements.[tag].class.[value]
	
  elements {
    BODY.all = 1 
    BODY.all.subpartMarker = DOCUMENT_BODY
		
    HEAD.all = 1
    HEAD.all.subpartMarker = DOCUMENT_HEADER
      # Tags entfernen um diese über TypoScript anzupassen
      # rmSingelTags -> für Tags ohne End-Tags
    HEAD.rmTagSections = title
		
    TD.all = 1

      # Box1
 #   TD.id.box1header = 1
 #   TD.id.box1content = 1

      # Box2
 #   TD.id.box2header = 1
 #   TD.id.box2content = 1

      # Box3
 #   TD.id.box3header = 1
 #   TD.id.box3content = 1
	  
      # Dropdown Menu
    UL.id.navigation = 1
		
      # TopBox
    SPAN.id.headline-topbox = 1
    DIV.id.text-topbox = 1
		
      # NewsBox (evtl. Ausglieder in externes Template da überall benötigt)
    SPAN.id.headline-newsbox = 1
    DIV.id.text-newsbox = 1
		  
      # Footer
    SPAN.id.footer = 1
		
  }
	
    # Alle relative Pfade verweisen auf:
  #relPathPrefix = ...
}

  #########################################################
  # MySQL Query Abfragen - trennen von content und header #
  #########################################################

lib.stdheader >
temp.topboxheader = CONTENT
temp.topboxheader {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 1
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = header
   
    # HTML-Code vor/nach dem dynamischen Eintrage (Wrap)
  stdWrap.required = 1
  stdWrap.wrap = <b> | </b>
   
    # Falls leer, Seitentitel ermitteln und verwenden
  stdWrap.ifEmpty.cObject = TEXT
  stdWrap.ifEmpty.cObject.field = title
}

temp.topboxcontent = CONTENT
temp.topboxcontent {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 1
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = bodytext
}


temp.box1header = lib.stdheader.1.10.1

temp.box1content = CONTENT
temp.box1content {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 0
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = bodytext
}


temp.box2header = CONTENT
temp.box2header {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 2
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = header
   
    # HTML-Code vor/nach dem dynamischen Eintrage (Wrap)
  stdWrap.required = 1
  stdWrap.wrap = <b> | </b>

}

temp.box2content = CONTENT
temp.box2content {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 2
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = bodytext
}


temp.box3header = CONTENT
temp.box3header {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList=this
    orderBy = sorting
    where = colPos = 3
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = header
   
    # HTML-Code vor/nach dem dynamischen Eintrage (Wrap)
  stdWrap.required = 1
  stdWrap.wrap = <b> | </b>

}

temp.box3content = CONTENT
temp.box3content {
    # Artikel-Ueberschrift ermitteln
  table = tt_content
  select {
    pidInList = this
    orderBy = sorting
    where = colPos = 3
    begin = 0
    max = 1
  }
   
  renderObj = TEXT
  renderObj.field = bodytext
}

  ################################################################
  # Ersetzen der HTML-Vars durch Content + Zuweisung PAGE Object #
  ################################################################
	
  # Template für BODY Bereich
	
temp.mainTemplate = TEMPLATE
temp.mainTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_BODY
  subparts {
      # Ersetzen von "navigation" Dropdown Menu
    navigation = HMENU
    navigation {
      special = directory
      special.value = 2
      1 = TMENU
      1 {
        expAll = 1
        noBlur = 1
        NO = 1
        NO.wrapItemAndSub = <li>|</li>

        IFSUB = 1
        IFSUB.wrapItemAndSub = <li>|</li>
        ACTIFSUB < .IFSUB
      }
      
      2 < .1	
      2 {
        wrap = <ul>|</ul>
        # NO.innerWrap2 = <span class="navi-sub">|</span>
      }
      
      3 < .2
      4 < .2
    }

    
      # NewsBox Überschrift + Content
    headline-newsbox = HTML
    headline-newsbox {
      
        # Überschrift
      value = Neuigkeiten
    }
    text-newsbox = HTML
    text-newsbox {
      
        # Content
      value = <h4>inbits Security Modules</h4><div>ab sofort verfügbar!</div>
    }
    
    
      # TopBox Überschrift + Content		
    headline-topbox < temp.topboxheader
    text-topbox < temp.topboxcontent
    
		
    # Textboxen Table
    box1header < temp.box1header
    box1text < temp.box1content
    
    box2header < temp.box2header
    box2text < temp.box2content
    
    box3header < temp.box3header
    box3text < temp.box3content

      # Footerzeile
# Einen Klickpfad erstellen
      footer = COA
      # COA erlaubt mehrere Objekte für den Platzhalter
      footer {
          # vorgeschalteter Text
        10 = TEXT
        10.value = (c) 2006 inbits AG |
          # Klickpfad an Position 20 darstellen
        20 = HMENU
        20 {       
          special = directory
          special.value = 45
          1 = TMENU
          1.NO = 1
          1.NO {
            linkWrap =  | | |*|  | | |*|  |
          }
        }
      }
		#footer = HTML
    #footer {
        # Content - Footerzeile
      #value = <a href="#copyright">(c) 2006 inbits AG</a> - <a href="#copyright">Impressum</a> | <a href="#copyright">AGB</a> | <a href="#copyright">Kontakt</a> | <a href="#copyright">Sitemap</a>
#    }
    
  }
  
}

  # Template für HEAD Bereich
	
temp.headTemplate = TEMPLATE
temp.headTemplate {
  template =< plugin.tx_automaketemplate_pi1
  workOnSubpart = DOCUMENT_HEADER
}

  ###############
  # PAGE Object #
  ###############

  # Default Object Num0
	
page = PAGE
page {
  typeNum = 0
	
  config {
      # Verwenden der XHTML 1.1 DTD
    doctype = xhtml_11
      # JavaScript Funktionen aus dem HEAD entfernen
    removeDefaultJS = 1
      # Ausgabe von XHTML aktivieren
    xhtml_cleaning = all
      # XML Prolog unterdrücken wegen Quirks Mode IE
    xmlprologue = none
    
      # AWStats - Logging aktivieren
    stat = 1
    stat_apache = 1
    stat_apache_logfile = inbitsde.log 
  }
  
    # Einbindung der CSS Datei
  stylesheet = fileadmin/css/stylesheet.css
  
    # Zuweisen BODY Template
  10 < temp.mainTemplate
	
    # Headerdaten
  headerData = COA
  headerData{

      # Zuweisung Header Template
    10 < temp.headTemplate
      
      # Einbinden CSS
    11 = TEXT
    11 {
      value = <link rel="stylesheet" type="text/css" href="fileadmin/css/stylesheet.css" />
    }
      
      # Einbinden JS
    12 = TEXT
    12 {
      value = <script type="text/javascript" src="fileadmin/js/menu_dropdown.js"></script>
    }
  }
  
}