[TYPO3-english] Rendering shortcuts

Tomas Mrozek mail at cascaval.com
Sat Nov 21 12:26:19 CET 2009


Alright, try the following code.
Notice that I replaced "id" with "class" in the DIV tags as each element
on the page gets wrapped so "id" doesn't make sense.

temp.myImage = COA
temp.myImage {
  wrap = <div class="exampleimage">|</div>

  10 = IMAGE
  10 {
    stdWrap {
      typolink {
        parameter.field = image_link
      }
    }

    file {
      import = uploads/pics/
      import.field = image
      import.listNum = 0
    }
  }

  20 = TEXT
  20 {
    required = 1
    field = imagecaption
    wrap = <div class="exampledesc">|</div>
  }
}

temp.examplelist = CONTENT
temp.examplelist {
  table = tt_content
  select {
    where = colPos=2
  }

  renderObj = CASE
  renderObj {
    stdWrap.wrap = <div class="examplebox" >|</div>
    key.field = CType

    image < temp.myImage

    html = TEXT
    html {
      field = bodytext
    }

    shortcut = RECORDS
    shortcut {
      source.field = records
      tables = tt_content

      conf.tt_content < tt_content
      conf.tt_content.image >
      conf.tt_content.image < temp.myImage
    }
  }
}

Tomas Mrozek


More information about the TYPO3-english mailing list