This page is still a beta!

Filter options

Category

Search

Reset

Add snippet

If you would like to create a new snippet, please click here:

Add snippet

excute / render single TypoScript Snippet / Object

Author Tags Category Date
Jonas Dübi

3 snippets

FE, typoscript, cObject php July 02, 2008

With this script you can render any typoscript with your record data. You can do in example images or typolinks with this very very easy.

  1. // clone the cObj so the data you writh into it does not influence the cObj which is used by the whole pi, otherwise you'll get strange phenomens
  2. $localCObj = clone $this->cObj;
  3.  
  4. // add your record data
  5. $localCObj->data = $yourrecord;
  6.  
  7. // execute your typoscript
  8. $content = $localCObj->cObjGetSingle($this->conf['coolobject'], $this->conf['coolobject.']);
  9.  
  10.  
  11. /*
  12.  
  13. You could render the record title as linked text very easy:
  14.  
  15. coolobject = TEXT
  16. coolobject {
  17.   field = title
  18.   typolink = 1
  19.   typolink.parameter.field = url
  20. }
  21.  
  22. */
  23.  
Copy to Clipboard