[TYPO3] where can value for ###STORAGE_PID### for extension tca be set?

Andrew Davis andrew at avagraphique.com
Thu Jul 5 21:31:54 CEST 2007


HI,

A am trying to work with the extension realty (tx_realty_pi1).

IN backend, when I create some cities, and then some entries, it does 
not allow me to choose the existing cites in drop down. I looked in 
tca.php for the extension, and for the item here is the entry that sets 
up the dropdown:


'city' => Array (
'exclude' => 0,
'label' => 'LLL:EXT:realty/locallang_db.xml:tx_realty_objects.city',
'config' => Array (
	'type' => 'select',
	'foreign_table' => 'tx_realty_cities',
	'foreign_table_where' => 'AND tx_realty_cities.pid=###STORAGE_PID### 
ORDER BY tx_realty_cities.uid',
	'size' => 1,
	'minitems' => 0,
	'maxitems' => 1,
	'wizards' => Array(
		'_PADDING' => 4,
		'_VERTICAL' => 0,
		'add' => Array(
			'type' => 'script',
			'title' => 'Create new record',
			'icon' => 'add.gif',
			'params' => Array(
				'table'=>'tx_realty_cities',
				'pid' => '###STORAGE_PID###',
				'setValue' => 'prepend'
			),
			'script' => 'wizard_add.php',
		),
		'edit' => Array(
			'type' => 'popup',
			'title' => 'Edit',
			'script' => 'wizard_edit.php',
			'popup_onlyOpenIfSelected' => 1,
			'icon' => 'edit2.gif',
			'JSopenParams' => 'height=350,width=580,status=0,menubar=0,scrollbars=1',
		),
	),
)
),




The part where it has ###STORAGE_PID###, if i replace that manually in 
the code with the pid where the records are, it finds them as it should. 
So somehow that ###STORAGE_PID### is not being replaced.

I looked in typo3_core_api, and it doesn't give an explanation of where 
the value is taken for this particular thing.

so should that be set as a constant? The manual for the realty extension 
says nothing about this. I tried to see if I could see any

any suggestions?

Any help is much appreciated!

Andrew






foreign_table_where string
(SQL
WHERE
clause)
The items from "foreign_table" are selected with this WHERE-clause.
The table is joined with the "pages"-table and items are selected only 
from pages
where the user has read access! (Not checking DB mount limitations!)
Example:
AND [foreign_table].pid=0 ORDER BY [foreign_table].sorting
Markers:
You can use markers in the WHERE clause:
• ###REC_FIELD_[fieldname]###
• ###THIS_UID### - is current element uid (zero if new).
• ###CURRENT_PID### - is the current page id (pid of the record).
• ###STORAGE_PID### Proc. /
Display


More information about the TYPO3-english mailing list