Realurl configuration
Feb 22, 2010 PHP, Typo3
Posted by
admin
Sometimes we need friendly reading url which realurl can support it powerfully.But when we built our own extension ,What should we pay attension to ?
At first .Note that make the link with plugin class method.
$this->pi_getPageLink($pageId,”,$param).
Here $pageId is the Id of page ,$param is like this
$param = array(‘tx_bookonline_pi1[cID]‘=>$cat_uid);
Then we just need change the configuration file of realurl to let it know how to translate our parameter tx_bookonline_pi1[cID].
add this code
$TYPO3_CONF_VARS['EXTCONF']['realurl']['_DEFAULT']['postVarSets'] = array(
‘_DEFAULT’ => array (
‘category’ => array(
array(
‘GETvar’ => ‘tx_bookonline_pi1[cID]‘,
‘lookUpTable’ => array(
‘table’ => ‘tx_bookonline_category’,
‘id_field’ => ‘uid’,
‘alias_field’ => ‘name’,
‘addWhereClause’ => ‘ AND NOT deleted’
)
),
),
);
So realurl can work and translate the url to /category/name.Good luck!
Leave a Reply