[TYPO3-english] Rendering shortcuts

Tomas Mrozek mail at cascaval.com
Fri Nov 20 10:24:44 CET 2009


Please, DO NOT hijack threads! Start a new one!

> How can I render tt_content records which are of ctype: shortcut ?

Copy the way this type of content is set in TypoScript (see
tt_content.shortcut). In short, use the RECORDS object.

But remember that in the "Insert records" content element (= shortcut),
you can set records from various tables and when you insert a tt_content
record, it has many subtypes, each rendered differently. This might
complicate your setup.

You can try to start with something like this:

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

  renderObj = COA
  renderObj.wrap = <div id="shortlist" >|</div>
  renderObj {
    5 = CASE
    5 {
      key.field = CType

      shortcut = RECORDS
      shortcut {
        source.field = records
        tables = tt_content
        conf {
          tt_content < tt_content
        }
      }
    }
  }
}

...and continue by modifying
temp.shortlist.renderObj.5.shortcut.conf.tt_content

Tomas Mrozek


More information about the TYPO3-english mailing list