Is it possible to integrate Fuel CMS to current system
Hi, I had an e-commerce application that is using Codeigniter. Is it possible to integrate fuel cms into the current system with a minimum change needed to be made? I really like some features from Fuel CMS that my current system is lacking.
Thanks
Comments
Can I call a controller function on block?(for example: minicart controller, which contains all models and views related to minicart. calling this controller will make block display the minicart)
Also, I getting this error while trying to put a block/site variable into a blog post: Compilation error at line 2 in "string:" : Parse error in "uote’)}.
this is the blog post:
<blockquote>this is test blog</blockquote><img src="{img_path('numbers.png')}" alt="" />{fuel_var('quote')}
$CI =& get_instance(); $method_result = $CI->_my_controller_method(); ...
Using $this->_my_controller_method() won't work in a block like a normal view file because of how it is loaded.
For blocks in the CMS, you may want to extract the controller method call perhaps into a separate static block outside the CMS where you can control the PHP logic the way you want and then have that block load in the block from the CMS. Example:
// static block file views/_blocks/my_static_block.php <p>This is my static block code in which I nest my CMS controlled block</p> <?php $CI =& get_instance(); $method_result = $CI->_my_controller_method(); echo fuel_block(array('view' => 'my_cms_block', 'vars' => array('data' => $method_result)); ?>
We tend to use static block files for more complicated blocks that have a lot of PHP logic instead of blocks pulled from the CMS. This allows us greater control without needing to use the Dwoo templating parser syntax.
With regards to your parse error, what happens if you remove the quotes around the word "quote"? e.g.
{fuel_var(quote)}
I've occasionally found parsing issues with Dwoo when using quotes in functions