Is it possible to integrate Fuel CMS to current system

edited July 2011 in News & Announcements
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

  • edited 8:12PM
    It's highly possible. Your normal controllers, views and models should still work. You should be able to convert your existing models into simple module models so that it can be managed in the admin. Would be interested to hear how it goes for you.
  • edited July 2011
    I tried Fuel for smaller projects such as blog or static site with different templates. Fuel is AMAZING, it definitely saved me a lot time here. But when I move to more customized blocks which requires php coding, I am not 100% sure how I can write in the block's body.

    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')}
  • edited 8:12PM
    If your block is a static block file that exists in the views/_blocks folder, you can use something like the following inside your block:
    $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
Sign In or Register to comment.