Zum Inhalt springen

Nur normaler Content funktioniert!?

Erstellt am 19. April 2005 · 26 Antworten · letzte Antwort am 22. April 2005 · Seite 2 von 2

Tags: Frage

Fabian-K ·

Mh das problem is dass die ganze kiste local auf nem apache in meiner Firma steht.. Und die kiste is halt nicht ans Internet (solange es nicht richtig laeuft; ist nen Auftrag vom chef) angebunden, also kann ich da niemanden dran 'rumspielen' lassen 🙁

Zum Thema:
Es ging ja darum wie man mit T3 den Marker ersetzt, also was genau ich da reinschreiben muss damit es ersetzt wird 🙂

Ich wuerde das ganze testweise einfach mal in ein neues Template (also T4) einfuegen und an das Root-Template anhaengen.
Nur was ich in das neue template eingeben soll, DAS ist es was ich nicht weiss.

webdeveloper ·

Morgen Fabian,

schau mal meinen Post etwas weiter oben an.
Da steht, WAS du im root template schreibst, und WAS in das neue Template geschrieben wird 😉

wer lesen kann, ..... du weisst schon *g*

Fabian-K ·

Moin 🙂

Ja das habe ich ja jetzt alles,
aber es wird mir nur eine leere Seite angezeigt.
Verweise (zur Templatedatei etc.) sind alle korrekt angelegt.

Aber wie gesagt:
Ich habe nur eine leere weisse Seite 🙁

Ich habe jetzt die html-Seite (siehe oben), das Root-Template mit folgendem Inhalt

seite = PAGE 
seite { 
  typeNum = 0 
  bodyTag = <body> 
  10 = TEMPLATE 
  10.template = FILE 
  10.template.file = fileadmin/main/template_1.html 
  10.workOnSubpart = DOCUMENT_BODY
  10.marks { 
    RECHTS < temp.rechts 
    LINKS < temp.links 
  } 
}

und das T4 mit folgendem Inhalt

temp.rechts = CONTENT 
temp.rechts { 
 table = tt_content 
 select.orderBy = sorting 
 select.where = colPos = 2 
}

T4 is beim Root-Template eingebunden,
allerdings ist (wie gesagt) nur eine weisse Seite zu sehen.

webdeveloper ·

dann poste doch mal das template hier 😉

vllt. haste ja ne klammer net geschlossen, oder aber nen kommentar durchlaufen lassen. *who knows*

Fabian-K ·

Also, hier nochmal ALLES was ich an source habe:

Root-Template

seite = PAGE 
seite { 
  typeNum = 0 
  bodyTag = <body> 
  10 = TEMPLATE 
  10.template = FILE 
  10.template.file = fileadmin/template/main/template_1.html 
  10.workOnSubpart = DOCUMENT_BODY
  10.marks { 
    RECHTS < temp.rechts 
    #LINKS < temp.links 
  }
}

ext: Main TEMPLATE cObject:

# 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_1 < temp.menu_1
 
    # Substitute the ###content### subpart with some example content:
  subparts.content < styles.content.get

}
 
 
# 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

ext: Menu 1

# 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>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 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>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 1
  ACT.allWrap = <div class="menu1-level2-act"> | </div>
}

  # Third level menu-object, textual
temp.menu_1.3 = TMENU
temp.menu_1.3 {
    # Normal state properties
  NO.allWrap = <div class="menu1-level3-no"> | </div>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 1
  ACT.allWrap = <div class="menu1-level3-act"> | </div>
}

  # Third level menu-object, textual
temp.menu_1.4 = TMENU
temp.menu_1.4 {
    # Normal state properties
  NO.allWrap = <div class="menu1-level4-no"> | </div>
  NO.stdWrap.htmlSpecialChars = 1
    # Enable active state and set properties:
  ACT = 1
  ACT.stdWrap.htmlSpecialChars = 1
  ACT.allWrap = <div class="menu1-level4-act"> | </div>
}

ext: Auto-parser plugin

# Configuring the Auto-Parser for main template:
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
  }
 
    # Prefix all relative paths with this value:
  relPathPrefix = fileadmin/template/main/
}

temp.rechts

temp.rechts = CONTENT 
temp.rechts { 
 table = tt_content 
 select.orderBy = sorting 
 select.where = colPos = 2 
}

So, das waren jetz die Template-Datein.
Alle Templates sind in das erste Template (Root-Template) verlinkt.
Reihenfolge:
ext: Auto-parser plugin
ext: Menu 1
ext: Main TEMPLATE cObject
temp.rechts

Hier jetzt meine HTML-Template-Source:

<?xml version="1.0" excoding="iso.8859-1"?>
<?xml-stylesheet href="#internalStyle" type="text/css"?>
<!DOCTYPE html
  PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EM"
  "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transidional.dtd">
<html>
<head>
	<title>Base template, header, menu, content and footer.</title>
	<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"/>
	<style type="text/css" id="internalStyle">
		/*<![CDATA[*/
		BODY {  margin: 0 0 0 0; background-color: white; }
		/*]]>*/
	</style>
	<link href="res/stylesheet.css" rel="stylesheet" type="text/css" />
</head>
<body>
	<table border="0" cellpadding="0" cellspacing="0">

		<!-- Header image row: -->
	<tr>
		<td colspan="3" id="header_1"><img src="images/headerimage.jpg" width="600" height="100" alt="" border="0" /></td>
	</tr>
	<tr>

		<!-- Menu table cell: -->
		<td width="200" id="menu_1">
			<div class="menu1-level1-no"><a href="#">Menu item 1</a></div>
			<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
			<div class="menu1-level1-act"><a href="#">Menu item 3 (act)</a></div>
			<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
			<div class="menu1-level2-no"><a href="#">Level 2 item</a></div>
			<div class="menu1-level2-act"><a href="#">Level 2 item (act)</a></div>
			<div class="menu1-level1-no"><a href="#">Menu item 2</a></div>
		</td>

		<!-- Page Content Area table cell: -->
		<td width="460" id="content">
			<h1>Buy PaperShredder(tm) Gizmo with 30-days money-back guarantee!</h1>
			<img src="images/paperwork.jpg" width="192" height="156" border="0" alt="" align="right"/>
			<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
			<p class="bodytext">jhsdfghjfsdgsdjfghdhfjghdfgdfgkdfhkgdfvbk</p>
			<br />
		</td>
	    <td width="160">###RECHTS###</td>
	</tr>
	
		<!-- Footer row: -->
	<tr>
		<td colspan="3" id="footer">
			<p>Main Dish &amp; Son inc. * 12345 MuhKuh City, suite 1337 * Hannover</p>
		</td>
	</tr>
	</table>
</body>
</html>

Ich hoffe da findet jemand was.
Sonst bin ich ehrlich gesagt voll am Arsch!

webdeveloper ·

wo hast du z.b. temp.mainTemplate definiert?? also im root...

nirgendwo, benutzt es aber in ext. ts "Main TEMPLATE cObject"

mal abgesehen davon, dass das root und das main TS sehr viele gemeinsamkeiten haben... (viel doppelt!!)

temp.headTemplate
beispielsweise ist auch nirgends definiert!

das muss alles da rein

  10.marks {
    RECHTS < temp.rechts
    #LINKS < temp.links
  }
Unbekannter Benutzer ·

ich find das eh alles ziemlich umständlich. Kann man natürlich so machen, aber für den ersten Versuch schon bisschen aufwändig.

Warum probierst Du nicht den Weg über die statischen Templates und styles.content.get etc? Damit bringst Du Dein TS Template auf 20% runter womit Du Dich sicher erst mal einfach tust.

Viele Grüße
Niki

Fabian-K ·

Mh solange es funktioniert ist mir erstmal egal wie ich das mache!!!!!!!

Aber wie laeuft das mit dem statischen?
Wo finde ich da ein Tutorial?
Mein Haupt-problem sind halt die Links/Normal/Rechts/Rand-Contents, also wie ich die anzeigen lasse, also wie genau da der TypoScript-Source lauten muss.

(Wenn es fuer den Anfang einfacher is, isses natuerlich besser. Denn es muss so schnell wie moeglich fertig werden..)

Unbekannter Benutzer ·

blätter mal eine Seite zurück da habe ich den Vorschlag schon mal gemacht.

D.h.:
statische Templates einbinden: z.b. content (default) und cSet stylesheet.

Dann: Marker in Deiner HTML Vorlage setzen (CONTENT, CONTENT_RIGHT, CONTENT_LEFT)

Die Marker dann bedienen mit styles.content.get, styles.content.getRight, styles.content.getLeft)
Dann brauchst Du Dich nicht mit colPos etc. herumschlagen. Der Zuweisungsoperator ist <

Statische Templates einbinden kannst Du nach Klick auf "edit whole template record" und da gibts dann eine Möglichkeit zu.

Viele Grüße
Niki

Fabian-K ·

Hi!
Sorry hab ich wohl ueberlesen, sorry.. werde es wohl erstmal so loesen und dann auf die 'komplexe' version zurueckkehren sobald es erstmal laeuft und ich mich tiefer mit typo3 beschaeftigen kann..

Danke erstmal @ all 🙂

Fabian-K ·

Yawohl, Meister!
Danke nochmal 🙂

Mh mittwoch abend muss die Seite online sein.. mh.. langsam mach ich mir echt in die Hose wegen dem zeitdruck o.O o.O

Naja ich schaff das schon irgendwie.. notfalls darf ich nicht Schlafen 😉

Naja danke nochmal an euch alle 🙂