[eluser]raimon[/eluser]
Hello again,
I'm trying to play with EXTjs and CodeIgniter, but at this moment, they don't want ...
I did all what you said in your previous post, but when I'm using this from a controller, I'm getting lots of errors ...
[quote author="Namulator" date="1195592171"]
Then within your controllers, you can call it like so...
Code:
$this->load->model('ScriptsModel');
$Script = $this->ScriptsModel->GetScript('ExtJS', '1.1.1');
$PageData = array();
$PageData['CSS'] = $Script['Versions']['1.1.1']['css'];
$PageData['JS'] = $Script['Versions']['1.1.1']['js'];
$this->load->view('YourPage', $PageData);
This is what I did to get started. Feel free to use it, and change it to suite your needs if you want.[/quote]
here are the errors:
Code:
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: models/scriptsmodel.php
Line Number: 16
A PHP Error was encountered
Severity: Notice
Message: Undefined index: Versions
Filename: models/scriptsmodel.php
Line Number: 41
A PHP Error was encountered
Severity: Warning
Message: Invalid argument supplied for foreach()
Filename: models/scriptsmodel.php
Line Number: 41
So, maybe I'm doing something wrong ...
My extjs folder is located:
Code:
http://127.0.0.1/igni/system/application/views/scripts/extjs/
My scriptsmodel.php:
Code:
http://127.0.0.1/igni/system/application/models/scriptsmodel.php
I'm only using EXTjs 2.0.
and in my views, I have my .html or .php pages, that inside call the .js file, that is also located into the views folder.
maybe I have to tell to the scripts where is the extjs folder, I'm struggling my brain for some hours and couldn't find where the problem is ...
regards,
raimon