Difference between #2 and #3 of
Include Yii framework in a Joomla module

Revision #3 has been created by zaccaria on Jan 28, 2011, 1:06:23 PM with the memo:

minor
« previous (#2) next (#4) »

Changes

Title unchanged

Include Yii framework in a Joomla module

Category unchanged

How-tos

Yii version unchanged

Tags unchanged

CMS joomla inclusion

Content changed

[...]
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
YiiJoomla 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
get routing with get format, but it would be very nice to use url routingpath format. 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.
[...]
8 2
17 followers
Viewed: 28 939 times
Version: 1.1
Category: How-tos
Written by: zaccaria
Last updated by: Anupam
Created on: Jan 28, 2011
Last updated: 7 years ago
Update Article

Revisions

View all history