Revision #3 has been created by zaccaria on Jan 28, 2011, 1:06:23 PM with the memo:
« previous (#2) next (#4) »
Include Yii framework in a Joomla module
CMS joomla inclusion
[...]RewriteRule yiimodule\.shtml$ /index.php?option=com_jumi&fileid=13&yiiPath=$1 [L]
RewriteRule ^yiimodule/([A-z_0-9/]+)\.shtml$ /index.php?option=com_jumi&fileid=13&yiiPath=$1 [L]
This will explain
Yii that for the path yiimodule he has to use the module with id 13, that means our application.
It will also take the path and passing to the application as the get paramter 'yiiPath'
Now our application can work using
, but it would be very nice to use
For achive it we have to use a custon CHttpRequest class
Create a file in components named JHttpRequest with this content:
[...]class JClientScript extends CClientScript
public function registerCssFile($url, $media='')
JHTML::_('stylesheet', $filename = '', $path = $url , $attribs = array() );
public function registerScriptFile($url, $media='')
JHTML::_('script', $filename = '', $path = $url , $attribs = array() );
As you see, this function will invoke Joomla's methods for publishing css and script file.