Hi!
Habe ein HTML-Template, dass bereits ein <body>-tag beinhaltet und weise den vorhandenen MArkern per TS den jeweiligen inhalt zu. Wenn man sich den erzeugten HTML-Code anschaut sieht man aber, dass 2 <body>-Tags erzeugt werden, nämlich das aus meinem Template und eine weiters: <body bgcolor=#ffff>
Wie kann man das verhindern, schliesslich ist das kein sauberes HTML mehr?
Happy WE
maxhb
Hi,
vermutlich steht in deiner Designvorlage der body-tag innerhalb vom Document-Subpart.
Setz ihn davor, dann sollte nur noch der von Typo generierte body tag im Quelltext auftauchen.
Ciao,
Sacha
Hi!
Also, das Body-tag steht nicht im Documentbody mit drin. Mein template beginnt folgendermassen:
<html>
<head>
</head>
<body marginwidth=0 marginheight=0 scroll=auto background="/typo3/fileadmin/bgbody.gif"><a name="top"></a>
<!-- ###DOCUMENT_BODY### begin -->
Andere Idee?
maxhb
Hi,
seltsam ist bei mir auch so:
<body>
<!-- ###DOCUMENT### start--->
und TS:
###############################################
#'page' als Standard-PAGE object anlegen(type=0)
page = PAGE
page.typeNum = 0
###############################################
###############################################
#remove non-valid attributes from body-tag
page.bodyTag = <body>
###############################################
###############################################
# load css-file and html-template
page.stylesheet=fileadmin/css/flyout.css
page.20 = TEMPLATE
page.20 {
template = FILE
template.file = fileadmin/templates/template_flyout.htm
}
###############################################
###############################################
#fill html-template with content via TS
page.20 {
workOnSubpart = DOCUMENT
#fill subparts with content via subtemplates
subparts.MENU1 < temp.topmenu.flyout
subparts.BREADCRUMB < temp.rootline.flyout
subparts.CONTENT < styles.content.get
}
###############################################
und ich habe nur ein body-tag im Frontend.
Ciao,
Sacha
Hi!
Also ich kann keine nennenswerten Unterschiede zwischen unseren templates und dem TS-Code erkennen. Bei mir sieht das Seiten-Setup folgendermassen aus:
#--------------------- SEITENSETUP START
# Seite erstellen und konfigurieren
page = PAGE
page.typeNum = 0
# Stylesheets einbinden
page.stylesheet = fileadmin/online_styles.css
#--------------------- SEITENSETUP ENDE
page.20 = TEMPLATE
page.20 {
template = FILE
template.file = fileadmin/template.html
workonsubpart = DOCUMENT_BODY
marks.PAGETITLE < tmpPagetitle
marks.CPID = TEXT
marks.CPID.data = TSFE : id
marks.CPID.wrap = <input type="hidden" name="redirect_url" value="index.php?id= | " />
marks.MAINMENU < tmpMenu
marks.SERVICEMENU < tmpSERVICEMENU
marks.RNDIMAGE = IMAGE
marks.RNDIMAGE < temp.rndImageTop
marks.LOGIN < tmpLogin.10
marks.CONTENT = CONTENT
marks.CONTENT < styles.content.get
}
Wo mag der Unterschied liegen?
cu
maxhb
P.S.: Einen Unterschied gibts aber doch, Du arbeitest mit Subparts, ich mit Markern. Das kann's doch aber nciht sein oder?
zeig mal dein html template her
Hi!
Mathias [netfielders] schriebzeig mal dein html template her
O.K., Du hast es so gewollt: 😉
<html>
<head>
</head>
<body marginwidth=0 marginheight=0 scroll=auto background="typo3/fileadmin/img/bgbody.gif"><a name="top"></a>
<!-- ###DOCUMENT_BODY### begin -->
<script src="typo3/fileadmin/stdFunctions.js" type="text/javascript">
</script>
<table border=0 cellpadding=0 cellspacing=0 width=100% height=100%>
<tr>
<td height=85 width=140><img src="typo3/fileadmin/img/spacer.gif" alt="" width=140 height=85 border=0></td>
<td height=85 width=16 rowspan=2 style="border-left:solid 1px #CB7617;"><img src="typo3/fileadmin/img/spacer.gif" height=85 width=16 alt="" border=0></td>
<td height=85 width=100% colspan=2>
<!-- Seitentitel Beginn -->
<table cellpadding=0 cellspacing=0 border=0 width=100%>
<tr>
<td colspan=3><img src="typo3/fileadmin/img/spacer.gif" height=38 width=20 alt="" border=0></td>
</tr>
<tr>
<td width=1% bgcolor=#C7D4D4><img src="typo3/fileadmin/img/spacer.gif" height=16 width=40 alt="" border=0></td>
<td width=2% class="head"><nobr>###PAGETITLE###</nobr></td>
<td width=98% bgcolor=#C7D4D4><img src="typo3/fileadmin/img/spacer.gif" height=16 width=1 alt="" border=0></td>
</tr>
<tr>
<td colspan=3><img src="typo3/fileadmin/img/spacer.gif" height=31 width=20 alt="" border=0></td>
</tr>
</table>
<!-- Seitentitel Ende -->
</td>
<td height=85 width=5 rowspan=2><img src="typo3/fileadmin/img/spacer.gif" height=85 width=5 alt="" border=0></td>
<td height=85 width=140 colspan=2 align=center><a href="typo3/index.php?id=hp_willkommen"><img src="typo3/fileadmin/img/logo.gif" height=85 width=140 name="logo" border=0></a></td>
</tr>
<tr>
<td height=100% width=140 align=left valign=top bgcolor=#557D7D>
<!-- Hauptmenü Beginn -->
<table cellpadding=0 cellspacing=0 border=0 bgcolor=#396969 width=100%>
<tr>
<td style="border-top: solid 1px #CB7617;">
###MAINMENU###
</td>
</tr>
<tr>
<td height=25 bgcolor="#557D7D"><img src="typo3/fileadmin/img/spacer.gif" height=25 width=140 alt="" border=0></td>
</tr>
<tr>
<td height=70>
<table cellpadding=0 cellspacing=0 border=0 bgcolor=#CB7617 width=100%>
<tr>
<td height=70 width=24 bgcolor=#396969 style="border-top:solid 1px #CB7617; border-bottom:solid 1px #CB7617; border-right:solid 1px #CB7617;"><img src="typo3/fileadmin/img/spacer.gif" height=70 width=24 alt="" border=0></td>
<td height=70 width=115 bgcolor=#396969 style="border-top:solid 1px #CB7617; border-bottom:solid 1px #CB7617;">###RNDIMAGE###</td>
</tr>
</table>
</tr>
<tr>
<td height=25 bgcolor="#557D7D"><img src="typo3/fileadmin/img/spacer.gif" height=25 width=140 alt="" border=0></td>
</tr>
<tr>
<td height=25 bgcolor="#557D7D" align=center>
<table cellpadding=0 cellspacing=0 border=0 width=90>
###SERVICEMENU###
</table>
</td>
</tr>
</table>
<!-- Hauptmenü Ende -->
</td>
<td height=100% width=100% align="left" valign="top">
<table cellspacing=0 cellspacing=0 width=100% border=0>
<tr>
<td>
<!-- Content Mitte Beginn -->
###CONTENT###
<!-- Content Mitte Ende -->
</td>
</tr>
<tr>
<td>
<hr>
<table cellspacing=0 cellpadding=0 border=0 width=100%>
<tr>
<td align=left>
<img src="typo3/fileadmin/img/pfeil-o.gif" height=7 width=7 class="linkImg" alt="" border=0><a href="#top">Nach oben</a>
</td>
<td align=right>
<img src="typo3/fileadmin/img/pfeil-r.gif" height=7 width=7 class="linkImg" alt="" border=0><a href="">© 2003</a>
</td>
</tr>
</table>
<img src="typo3/fileadmin/img/spacer.gif" height=1 width=450 alt="" border=0>
<!-- Content Ende -->
</td>
</tr>
</table>
</td>
<td height=100% width=17 style="border-right:solid 1px #C7D4D4"><img src="typo3/fileadmin/img/spacer.gif" height=85 width=19 alt="" border=0></td>
<td height=100% width=140 valign=top>
<!-- InfoBoxes Beginn -->
<table cellpadding=0 cellspacing=0 border=0 width=140>
<tr>
<td class="infobox">
<h3>News:</h3>
<u>Hier steht eine beispiel News:</u>
<br>
asdf asdf asdf asdf asdf asdf
</td>
</tr>
<tr>
<td class="infobox" align=right>
<img src="typo3/fileadmin/img/pfeil-b-r.gif" height=7 width=7 class="linkImg" alt="" border=0><a href="" class="infoboxLink">weiter</a>
</td>
</tr>
<tr><td class="infobox"><hr class="hrInfobox"></td></tr>
<tr><td class="infobox"><!--###USERNAME###-->###CPID###</td></tr>
###LOGIN###
<tr><td class="infobox"><hr class="hrInfobox"> </td></tr>
</table>
<!-- InfoBoxes Ende -->
</td>
</tr>
</table>
</body>
<!-- ###DOCUMENT_BODY### end -->
</html>
und wieso machst du den body vor dem document marker zu?
Hi,
probier mal
<!-- ###DOCUMENT_BODY### end -->
</body>
</html>
statt
</body>
<!-- ###DOCUMENT_BODY### end -->
</html>
Ciao,
Sacha
hehe, schneller ;-)
und dreh's mal um Sasha, dann geht das auch
Hi!
Also erstmal danke für die prompten Antworten 😃
Leider brachte die umstellung der Marker/tags nix, der erzeugte HTML-Code sieht immer noch folgendermassen aus:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<head>
...
</head>
...
<body bgcolor="#FFFFFF" onload="T3_onloadWrapper();">
...
<html>
<head>
</head>
<body marginwidth=0 marginheight=0 scroll=auto background="/typo3/fileadmin/img/bgbody.gif"><a name="top"></a>
<!-- ###DOCUMENT_BODY### begin -->
...
<!-- ###DOCUMENT_BODY### end -->
</body>
</html>
...
</body>
</html>
Und jetzt?
maxhb
ist da noch tidy oder sowas dazwischen?
Wie sieht der Quelltext mit:
http://webtools.mozilla.org/web-sniffer/ aus?
Hi!
sacha schriebist da noch tidy oder sowas dazwischen?
Nein, es ist eine "normale" Typo3-Seite.
Kann ich leider nicht überprüfen, da es sich um ein durch Firewall abgeschottetes LAN handelt...
Ich habe genau das selbe Problem und bisher auch keine Lösung dafür gefunden. (Anmerkung: Ich versuche XHTML zu bekommen und habe die Extension "Source Optimization" installiert und konfiguriert.)
Beweis, daß das selbe Problem bei mir auftritt auf www.in-memoriam-gabi.de.