Zum Inhalt springen

Content wird nicht angezeigt.

Erstellt am 3. Dezember 2007 · 10 Antworten · letzte Antwort am 3. Dezember 2007

Tags: Frage

Schwarzewolke ·

Hallo Community!
Hoffe ich bin hier richtig?
Mein Template für Typo3 habe ich nun fertig ..und die Seite wird auch im FE angezeigt .
Mein Problem mein Inhalt wird nicht angezeigt .
Ich nehme an das ich irgend ein Fehler im Typoscript habe
Hier mal mein Typoscript

page = PAGE
page {
	#bodyTag = <body>
	includeCSS {  
    	file1 = fileadmin/css/site.css
	
}
	
	10 = TEMPLATE
	10 {
    	template = FILE
    	template.file = fileadmin/templates/template.html

    	workOnSubpart = DOKUMENT
		marks{
		
			INHALT < styles.content.get
			
			LOGO = 
			


.nav2 = HMENU
.nav2 {
	special = directory
	special.value = 9
	1 = TMENU
	1.wrap=<ul>|</ul>
	
	1.NO = 1
	1.NO.linkWrap = <li>|</li>
	
	1.ACT = 1
	1.ACT < .NO
	1.ACT.doNotLinkIt = 1
	 
}

FOOTER = TEXT
FOOTER.value = Magic the Gathering ,copyright by Wizard of the Coast

Mein Template sieht wie folgt aus

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN">
<html>
<head>
<link rel="stylesheet" href="fileadmin/css/site.css" media="screen" type="text/css" />
<title>MTG-Essen</title>
 
</head>
 
<body>
<!-- ###DOKUMENT### start -->


	<div id="header"><img src="fileadmin/images/header2.png" height="200" width="850" border="0" alt="" /></div>

<div class="nav2">###TOPMENU###			
			<ul>
        <li><a href="index.php?id=9">Home</a></li>
        <li><a href="index.php?id=8">Termine</a></li>
        <li><a href="index.php?id=38">FAQ</a></li>
        <li><a href="index.php?id=7">Decklisten</a></li>			
        <li><a href="index.php?id=6">Gallery</a></li>
		  <li><a href="index.php?id=35">Downloads</a></li>
          <li><a href="index.php?id=34">Links</a></li>
          <li><a href="index.php?id=33">Kontakt</a></li>
          <li><a href="index.php?id=32">Impressum</a></li>
          
          </ul>
	</div>
	
</ul></div>
	<div id="content">###CONTENT###</div>
	<div id="footer"><img src="fileadmin/images/footer.png" width="850" height="40" alt="" />###FOOTER###</div>

</div>

<!-- ###DOKUMENT### end -->


</body>
</html>

und zum Schluss noch meine CSS

body {

	text-align:lect;
	background:#cccccc;
        margin: auto;
	width:850px;
	height:auto;
        font-size: 65%; 
        margin: 0px;  
        padding: 0px auto; 
        font-family: arial, sans-serif;
	
}

 

	

 

#content {
	float:left;
	background:#ffffff;
        width: 850px; 
        min-height: 250px;  
        color: rgb(75,75,75); font-size: 2.0em;}
}

#footer {
	clear:left;
	background:#00000;
	color:#fff;
	height:45px;
}

.nav2 {clear: both; margin: 0px; padding: 0px; font-family: verdana, arial, sans serif; font-size: 1.0em;}
.nav2 ul {float: left; width: 850px; margin: 0px; padding: 0px; border-top: solid 1px rgb(54,83,151); border-bottom: solid 1px rgb(54,83,151); background-color: rgb(0,0,0); font-weight: bold;}	
.nav2 li {display: inline; list-style: none; margin: 0px; padding: 0px;}
.nav2 li a {display: block; float: left; margin: 0px 0px 0px 0px; padding: 5px 10px 5px 10px; border-right: solid 1px rgb(54,83,151); color: rgb(255,255,255); text-transform: uppercase; text-decoration: none; font-size: 62,5%;}
.nav2 a:hover, .nav2 a.selected {color: rgb(192,192,192); text-decoration: none;}
.buffer {clear: both; width: 850px; height: 30px; margin: 0px; padding: 0px; background-color: rgb(255,255,255);}

/* Headings */
h1 {margin: 1.0em 0px 0.5em 0px; font-weight: bold; font-size: 160%;}
h2 {margin: 1.0em 0px 0.5em 0px; font-weight: bold; font-size: 150%;}
h3 {margin: 1.0em 0px 0.5em 0px; font-weight: bold; font-size: 140%;}
h4 {margin: 1.0em 0px 0.5em 0px; font-weight: bold; font-size: 130%;}
h5 {margin: 0px 0px 0.2em 0px; font-weight: bold; font-size: 130%;}
h6 {margin: 0px 0px 0.2em 0px;font-weight: bold; font-style: italic; font-size: 130%;}
Schwarzewolke ·

Okay danke für den Tipp ich habe je ein
</ul></div> in der Templatedatei entfernt ,welche zu viel waren .
Die Css habe ich mal durch den Validator geschickt und und so sieht die neue CSS aus

body {
background : #cccccc;
margin : auto;
width : 850px;
height : auto;
font-size : 65%;
margin : 0;
font-family : arial, sans-serif;
}
#content {
float : left;
background : #ffffff;
width : 850px;
min-height : 250px;
color : rgb(75, 75, 75);
font-size : 2em;
}
#footer {
clear : left;
color : #fff;
height : 45px;
}
#nav2 {
clear : both;
margin : 0;
padding : 0;
font-family : verdana, arial, sans serif;
font-size : 1em;
}
#nav2 ul {
float : left;
width : 850px;
margin : 0;
padding : 0;
border-top : 1px solid rgb(54, 83, 151);
border-bottom : 1px solid rgb(54, 83, 151);
background-color : rgb(0, 0, 0);
font-weight : bold;
}
#nav2 li {
display : inline;
list-style : none;
margin : 0;
padding : 0;
}
#nav2 li a {
display : block;
float : left;
margin : 0 0 0 0;
padding : 5px 10px 5px 10px;
border-right : 1px solid rgb(54, 83, 151);
color : rgb(255, 255, 255);
text-transform : uppercase;
text-decoration : none;
}
#nav2 a:hover, #nav a.selected {
color : rgb(192, 192, 192);
text-decoration : none;
}
.buffer {
clear : both;
width : 850px;
height : 25px;
margin : 0;
padding : 0;
background-color : rgb(255, 255, 255);
}
h1 {
margin : 1em 0 0.5em 0;
font-weight : bold;
font-size : 160%;
}
h2 {
margin : 1em 0 0.5em 0;
font-weight : bold;
font-size : 150%;
}
h3 {
margin : 1em 0 0.5em 0;
font-weight : bold;
font-size : 140%;
}
h4 {
margin : 1em 0 0.5em 0;
font-weight : bold;
font-size : 130%;
}
h5 {
margin : 0 0 0.2em 0;
font-weight : bold;
font-size : 130%;
}
h6 {
margin : 0 0 0.2em 0;
font-weight : bold;
font-style : italic;
font-size : 130%;
}

Mehr Fehler habe ich aber nicht gefunden .Gibt es noch Fehler in dem TS?
PS:Jetzt sieht das Menu im Internet Explorer anders aus als im Firefox *grummel*
PPS:Habe die Marker entfernt

just2b ·

ich meinte eigentlich nur das TS

10 = TEMPLATE gehört ins PAGE-obj rein, genauso wie die marker-Definitionenn innerhalb von page.10.marks gehöhren

georg

Schwarzewolke ·

@just2b
Irgendwie raff ich das grad nicht #angry# ...ich denk nochmal in der Wanne drüber nach vielleicht bekomme ich ja ein Geistesblitz.
Ansonsten bin ich über ein Tipp bzw Code schnipsel dankbar 😃

SLAng ·

Äh... das ist doch im Page-obj... mit der schließenden Klammer wird ja includeCSS geschlossen und nicht PAGE... hatte ich auch erst übersehen...
Dafür schnall ich den Krempel mit LOGO = und .nav2 nicht... was soll das? das ist weder ein marker und auch ist das keine CSS Class...

SLAng ·

Das kann auch nicht funktionieren, wenn dein Marker für den Content ###CONTENT### heißt, du aber in deinem TS INHALT schreibst... ebenso beim Menü... was soll das ".nav2"? Der Marker heißt doch TOPMENU...?!?
Desweiteren wird NO als Zustand nicht extra aktiviert...

Also so sollte da nen Schuh draus werden: (in kurzer Schreibweise, damit du die Bereiche besser siehst, was zusammen gehört)

page = PAGE
page {
	includeCSS { 
		file1 = fileadmin/css/site.css
	}

	10 = TEMPLATE
	10 {
		template = FILE
		template.file = fileadmin/templates/template.html

		workOnSubpart = DOKUMENT
		marks {
			CONTENT < styles.content.get
			TOPMENU = HMENU
			TOPMENU {
				special = directory
				special.value = 9
				1 = TMENU
				1 {
					wrap = <ul>|</ul>
					NO {
						linkWrap = <li>|</li>
					}
					ACT < .NO
					ACT {
						doNotLinkIt = 1
					}
					ACT = 1
				}
			FOOTER = TEXT
			FOOTER {
				value = Magic the Gathering ,copyright by Wizard of the Coast
			}
		}
	}
}
Schwarzewolke ·

Hey danke jetzt funktioniert der Content 🙂
Ich wusste doch,daß der Fehler irgendwo im Ts ist ..nur ich hab ihn nicht gefunden als Anfänger

just2b ·

aja danke slang...

@ wolke: immer brav einrücken, das bringt einen schnell auf fehler drauf oder schließt welche aus 😉

georg