[TYPO3] Rendering contentitems in a template

Lars Kappert lars at efocus.nl
Thu Sep 14 17:04:41 CEST 2006


Sorry for my late reaction, but I didn't receive an email with the
latest reply.

OK, I'll try to explain again. But I mean something really simple. And
let's forget about the css_styled_content plugin.

I have a template for a certain page. In the backend, I have placed two
content items in this page. I want to show them in this tiny template:

<body>
  <div id="content">
    dummy text
  <div>
</body>

Something like this should be in the "Setup" (= template) of my page:

subparts.content = HTML
subparts.content {
  value = (
    <h2> {$HEADER1}</h2>
    <p>{BODYTEXT1}</p>
    <h2> {$HEADER2} </h2>
    <p>{BODYTEXT2}</p>
  )
}

If I placed a content item with header "Lorem ipsum" and bodytext "Yeah
right" in the page, and another one with header "Dolor amet" and
bodytext "Are you sure?", then this would be the output:

<body>
  <div id="content">
    <h2>Lorem ipsum</h2>
    <p>Yeah right</p>
    <h2>Dolor amet</h2>
    <p>Are you sure?</p>
  <div>
</body>

It's really really simple I guess, but I just don't know how to get that
content in my frontend. I hope I am clear now... If not, let me know!



More information about the TYPO3-english mailing list