[TYPO3] header date problem
Roelof Wobben
rwobben at hotmail.com
Fri Mar 30 16:46:29 CEST 2007
Hoi Tadej,
I need your help one more time.
My TS looks now like this :
lib.stdheader {
# 1st we delete the original date object, which is placed before the header
5 >
# next we delete the original header type 1 object,
10.1 >
# and then create a new one.
10.1 = COA
10.1 {
# 1st we output the title
10 = TEXT
10.current = 1
10.insertData = 1
10.fontTag = <h1{register:headerStyle}{register:headerClass}>|</h1>
# 2nd we output the author field of the page, and wrap it
20 = TEXT
20.data = page:author
20.wrap = <div>Written by: |</div>
20.required = 1
# 3rd we format and output the date of the content element
30 = TEXT
30.field = date
30.strftime = %A, %d %B %Y
# More info on "strftime" formatting can be found here:
http://typo3.org/documentation/document-library/references/doc_core_tsref/4.0.0/view/2/2/
30.wrap = <div>Date: |</div>
30.if.isTrue.field = date
}
}
# menu
// --- SETUP start ---------------------------
includeLibs.foldoutmenu = typo3conf/ext/foldoutmenu/foldoutmenu.php
lib.zmenu = COA
lib.zmenu {
10 = HMENU
10.wrap = <div id="menuz"><ul>|</ul></div>
10.entryLevel = 1
10.1 = TMENU
10.1 {
expAll = 1
itemArrayProcFunc = user_foldoutMenu->getIfSubUidList
NO {
stdWrap.cObject = COA
stdWrap.cObject {
10 = CLEARGIF
10.width=9
10.wrap = |
20 = TEXT
20.field = title
}
ATagParams = class="no"
allWrap = <li>|</li>
}
CUR < .NO
CUR = 1
CUR.ATagParams = class="act"
IFSUB < .NO
IFSUB = 1
IFSUB {
doNotLinkIt = 1
subst_elementUid = 1
stdWrap.cObject = COA
stdWrap.cObject {
10 >
10 = IMAGE
10.file = {$lib.zmenu.imgFolder}{$lib.zmenu.collapseImg}
10.altText = Click to open
10.titleText = Click to open
10.params = align="top" id="zmenu-{elementUid}-0"
}
linkWrap = <A href="javascript:;"
onmousedown="zmenu.foldMenu('zmenu-{elementUid}');return false;"
style="cursor: pointer;cursor: hand;" class="no">|</a>
allWrap = <li>|<ul id="zmenu-{elementUid}">
wrapItemAndSub = |</ul></li>
}
ACTIFSUB < .IFSUB
ACTIFSUB = 1
ACTIFSUB.stdWrap.cObject.10.file =
{$lib.zmenu.imgFolder}{$lib.zmenu.expandImg}
ACTIFSUB.stdWrap.cObject.10.altText = Click to close
ACTIFSUB.stdWrap.cObject.10.titleText = Click to close
ACTIFSUB.stdWrap.cObject.10.params = align="top"
id="zmenu-{elementUid}-0"
#ACTIFSUB.allWrap = <li>|<ul id="zmenu-{elementUid}"
style="display:block;">
CURIFSUB < .IFSUB
CURIFSUB = 1
CURIFSUB.linkWrap = <A
onmousedown="zmenu.foldMenu('zmenu-{elementUid}');return false;"
style="cursor: pointer;cursor: hand;" class="act">|</a>
}
10.2 < .10.1
10.3 < .10.1
10.4 < .10.1
20 = TEXT
20.data = register:ifSubUidList
20.postUserFunc = user_foldoutMenu->JSWrapper
20.postUserFunc.prefix = zmenu
20.postUserFunc.startFolded = 1
20.postUserFunc.autoFold = 1
20.postUserFunc.foldCurrent = 1
20.postUserFunc.enableCookie = 1
20.postUserFunc.imagePath = {$lib.zmenu.imgFolder}
20.postUserFunc.imageSwap
= ["{$lib.zmenu.collapseImg}","{$lib.zmenu.expandImg}"]
20.postUserFunc.altSwap = ["Click to open","Click to close"]
20.required = 1
}
# Configuring the Auto-Parser for main template:
plugin.tx_automaketemplate_pi1 {
# Read the template file:
content = FILE
content.file = fileadmin/template/main/index2.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/
}
# 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### subpart with some example content:
subparts.menu < lib.zmenu
# 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
I have a template which look like this :
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="res/stylesheet.css" rel="stylesheet" type="text/css">
</head>
<body>
<table border="0" align="center" cellpadding="0" cellspacing="0"
id="container">
<tr>
<td><img src="images/header.jpg" width="750" height="355"></td>
</tr>
<tr>
<td height="458" valign="top">
<table width="100%" border="0" cellpadding="0" cellspacing="0"
id="container2">
<tr>
<td width="195" height="29" valign="top"> </td>
<td width="425" valign="bottom" id="title">Hier komt de
paginatitel</td>
<td width="130" valign="bottom" id="date">20-03-2007</td>
</tr>
<tr>
<td rowspan="2" valign="top" id="menu">
<a href="#">Menu item nummer 1</a> <br>
<a href="#">Menu item nummer 2</a><br>
<a href="#">Menu item nummer 3</a></td>
<td height="277" colspan="2" valign="top" id="content"><p>Hoera,
het is zover, eindelijk zwanger. De test laat niets te twijfelen over. Ik
ben net een stuiterbal, blij en energie voor tien. Ondanks het prille begin,
heb ik een goed gevoel over deze zwangerschap. Waarom? geen idee. Het voelt
gewoon goed. Het is moeilijk om ’s middags mijn mond dicht te houden
als ik met mijn zus in de stad ben. Het is maar goed dat er een
carnavalsoptocht is, het geeft een beetje afleiding. </p>
<p>Hoera, het is zover, eindelijk zwanger. De test laat niets te
twijfelen over. Ik ben net een stuiterbal, blij en energie voor tien.
Ondanks het prille begin, heb ik een goed gevoel over deze zwangerschap.
Waarom? geen idee. Het voelt gewoon goed. Het is moeilijk om ’s
middags mijn mond dicht te houden als ik met mijn zus in de stad ben. Het is
maar goed dat er een carnavalsoptocht is, het geeft een beetje afleiding.
Hoera, het is zover, eindelijk zwanger. De test laat niets te twijfelen
over. </p>
<p> </p>
<p><strong>Download <a
href="../tamarawobben.zip">tamarawobben.zip</a></strong></p>
<p> </p>
</td>
</tr>
<tr>
<td colspan="2" valign="top" id="nav">volgende </td>
</tr>
<tr>
<td colspan="3" valign="top" id="footer">(c) 2007 R. Wobben. Deze
layout is gemaakt door Argosmedia </td>
</tr>
</table>
</td>
</tr>
</table>
</body>
</html>
What i want is that the title is visible in the <td id="titel"> tag.
I used your code but nothing changed.
What am i doing wrong ?
Roelof
>From: Tadej Bregar <Tadej.Bregar at guest.arnes.si>
>Reply-To: TYPO3 English <typo3-english at lists.netfielders.de>
>To: typo3-english at lists.netfielders.de
>Subject: Re: [TYPO3] header date problem
>Date: Mon, 26 Mar 2007 23:45:17 +0200
>
>Hello Roelof,
>I don't know how to do this in TemplaVoila, but a week ago I had similar
>problem and Peter Klein had helped me with the following suggestion
>(below is a part of the Setup filed of the main template):
>
>-- cut --
>lib.stdheader {
>
> # 1st we delete the original date object, which is placed before the
>header
> 5 >
> # next we delete the original header type 1 object,
> 10.1 >
> # and then create a new one.
> 10.1 = COA
> 10.1 {
> # 1st we output the title
> 10 = TEXT
> 10.current = 1
> 10.insertData = 1
> 10.fontTag = <h1{register:headerStyle}{register:headerClass}>|</h1>
>
> # 2nd we output the author field of the page, and wrap it
> 20 = TEXT
> 20.data = page:author
> 20.wrap = <div>Written by: |</div>
> 20.required = 1
>
> # 3rd we format and output the date of the content element
> 30 = TEXT
> 30.field = date
> 30.strftime = %A, %d %B %Y
> # More info on "strftime" formatting can be found here:
>http://typo3.org/documentation/document-library/references/doc_core_tsref/4.0.0/view/2/2/
> 30.wrap = <div>Date: |</div>
> 30.if.isTrue.field = date
> }
>}
>
>-- cut --
>
>So using the code above I get:
>
>This is an example of some article in Typo3
>Written by: Tadej Bregar
>Date: 27.03.2007
>
>Here goes the "normal" text of the article ...
>
>
>I hope you got any help out of the code above.
>
>
>Regards,
>Tadej Bregar
>
>
>_______________________________________________
>TYPO3-english mailing list
>TYPO3-english at lists.netfielders.de
>http://lists.netfielders.de/cgi-bin/mailman/listinfo/typo3-english
_________________________________________________________________
Even lekker snel online vermaak? Ga dan naar www.msn.nl http://www.msn.nl
More information about the TYPO3-english
mailing list