[TYPO3] header date problem

Tadej Bregar Tadej.Bregar at guest.arnes.si
Mon Mar 26 23:45:17 CEST 2007


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:&nbsp;|</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:&nbsp;|</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




More information about the TYPO3-english mailing list