[TYPO3-dev]  flexform not working properly
    Tobias Grønlund 
    tobias at edev.dk
       
    Mon Jul 24 23:25:09 CEST 2006
    
    
  
Hi all,
Im in the proces of setting up a ext. with at flexform, but i cant get 
it to work properly. More precisely the ext. doesnt read the starting 
point properly. It stores the xml, and i am able to call the 
startingpoint set in the flexform with 
pi_getFFvalue($this->cObj->data['pi_flexform'], 'pages', 'sDEF')
But it wont list the items from the starting point. I have used the 
extension kickstarter and it listed the items perfectly before i started 
implementing the flexform. i've tried to follow the instructions on:
http://wiki.typo3.org/index.php/Extension_Development,_using_Flexforms
I have spent over 6 hours trying to figure this out, and i am getting 
quite irritated over this. SO PLEASE HELP...
Here is a snippet from my class.xxx_pi1.php file where I think I am 
doing something wrong:
function init($conf){
	$this->pi_initPIflexForm(); // Init and get the flexform data of the plugin
	// Getting the pid list via the flexform
	$pid_list = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 
'pages', 'sDEF') ? implode(t3lib_div::intExplode(',', 
$this->pi_getFFvalue($this->cObj->data['pi_flexform'], 'pages', 
'sDEF')), ',') : $GLOBALS['TSFE']->id;
	// Checking for recursive level
	$recursive = $this->pi_getFFvalue($this->cObj->data['pi_flexform'], 
'recursive', 'sDEF');
	if (is_numeric($recursive) && $recursive > 0) {
		$this->conf['pid_list'] = $this->pi_getPidList($pid_list,$recursive);
	}
	else {
		$this->conf['pid_list'] = $pid_list;
	}
}
	/**
	 * [Put your description here]
	 */
function main($content,$conf)	{
	$this->init($conf);
	switch((string)$conf["CMD"])	{
#		case "singleView":
#		list($t) = explode(":",$this->cObj->currentRecord);
#		$this->internal["currentTable"]=$t;
#		$this->internal["currentRow"]=$this->cObj->data;
#		break;
		default:
		if (strstr($this->cObj->currentRecord,"tt_content"))	{
			$conf['pidList'] = $pid_list;
			$conf['recursive'] = $recursive;
		}
		return $this->pi_wrapInBaseClass($this->listView($content,$conf));
		break;
	}
}
If you think that the problem is elsewhere, then please let me know...
  - Tobias
    
    
More information about the TYPO3-dev
mailing list