Posted By

jsegars on 03/27/08


Tagged

typo3


Versions (?)

Merge External Typoscript with Default Typoscript


 / Published in: PHP
 

This can be used if you have a Flexform field where a backend user enters Typoscript that only pertains to that single instance of the plugin, not all instances on the page.

  1. $flexformTyposcript = $this->pi_getFFvalue($piFlexForm, 'myTS','s_TS_View');
  2. if($flexformTyposcript) {
  3. require_once(PATH_t3lib.'class.t3lib_tsparser.php');
  4. $tsparser = t3lib_div::makeInstance('t3lib_tsparser');
  5. // Copy conf into existing setup
  6. $tsparser->setup = $this->conf;
  7. // Parse the new Typoscript
  8. $tsparser->parse($flexformTyposcript);
  9. // Copy the resulting setup back into conf
  10. $this->conf = $tsparser->setup;
  11. }

Report this snippet  

You need to login to post a comment.