[TYPO3-dev] Problem with selected records in pi_flexform

Sebastian Gebhard sebastian.gebhard at googlemail.com
Thu Sep 24 23:36:37 CEST 2009


Sebastian Gebhard schrieb:
> Somewhere the correct uids must be stored, but where?
I found the uids. They are stored in tx_tagpack_tags_relations_mm.

So, when someone ever tries anything similar:
You can't get the tag uids with $this->pi_getFFvalue() but you have to query them from tx_tagpack_tags_relations_mm like this:

	/**
	 * Get chosen tags for this plugin (uses $this->cObj->data)
	 *
	 * @return	string		Comma separated uid list of tags
	 */
	function getPluginTags(){
		$tagIds = array();
		$res = $GLOBALS['TYPO3_DB']->exec_SELECTquery('uid_foreign', 'tx_tagpack_tags_relations_mm', 'uid_local = '.$this->cObj->data['uid'].' AND tablenames = ""', '', 'sorting');
		while($row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res)){
			$tagIds[] = $row['uid_foreign'];
		}
		return join(',', $tagIds);
	}

The tags a stored a bit dirty and in some cases bugs may occur. But for me it works now.




More information about the TYPO3-dev mailing list