Q. When is the next version of Code Igniter coming out? What can I expect from the next version of Code Igniter?
A. Code Igniter is a product of EllisLab. New releases and new features in the framework are made available when it is possible to release them, and may always be a surprise:
http://codeigniter.com/forums/viewthread/53619/P15/#262381
Q. I’ve got cool new code for CI. What is the process for getting it included in the official CI distribution?
A. New code is welcome, but not all code can be included. To maximize the chances of your code making it into CI, test (PHP 4 and 5) and document the code. All decisions about incorporating it fall to EllisLab. Basically, if you want to satisfy your lust for abiding fame you have to make an effort to promulgate your code to as many CI developers as possible who put it through an informal ‘vetting’ process. As part of this process you should create a ‘manual page’ to help people learn.
Q. How do I embed views within views? Nested templates? Header, Main, Footer (Blocks) design? Partials? Page Fragments? Ruby on Rails style Yield functionality?
A. There are several approaches to this design problem.
Version 1.6 (Released January 31, 2008) has support for multiple views. See the User Guide for more details. That change to the core makes some of these approaches “old school” (as it were). This forum thread covers some good ground: http://codeigniter.com/forums/viewthread/87346/
First, basic information on views and the optional third ‘return’ parameter: http://www.codeigniter.com/wiki/Displaying_Multiple_Views/ and also, The CI Loader class documentation page
Coolfactor’s View Library is one solution to nesting views in a tidy way. http://codeigniter.com/forums/viewthread/49910/
Gyorgy Fekete’s View library similar to Coolfactor’s with the differences spelled out in the thread.
http://codeigniter.com/forums/viewthread/62521/
Another place to get advice if you don’t want to add a new library is Rick Ellis’ original thread on the subject (Embedding Views within Views). http://codeigniter.com/forums/viewthread/44916/
Also, teamhurting has implemented a Ruby On Rails style Yield approach that uses CI’s hooks system:
Yield using hooks - http://codeigniter.com/forums/viewthread/57902/
Another similar approach using a basic class rather than a class as a hook: http://codeigniter.com/wiki/layout_library/
A thread where esra lists a few threads on this topic: http://codeigniter.com/forums/viewthread/57965/
A Rails-Style ActionView library and helper called Ocular has a wiki page here: http://codeigniter.com/wiki/Ocular_Layout_Library/ and a thread here: http://codeigniter.com/forums/viewthread/65050/
A thread for a View library (author tested with Matchbox) http://codeigniter.com/forums/viewthread/67028/
Q. Can I cache only certain parts of a page?
A. This is related to the question above about nested templates and partials. Basically, CI cache library (1.5.4) only supports full page caching - it’s all or nothing. There are several contributions that can help.
The Sparks library is one approach. (NOTE: the Sparks object caching library is currently an orphan (as of 20070925) as the developer has moved on to Zend Framework - anyone want to step up and carry it on?)
In case you have questions to ask on the forum, please review this general information on caches. There are many levels of caching and they can be broken down into a few categories and approaches:
PHP code itself: php opcode of some kind
The following can be classed as session-specific or global caches depending on the approach:
DB cache: db query, db object serialization
HTML output cache: partial or full page caching
Browser cache is always (by definition) session-specific:
Browser cache: using headers to control cache, JS and CSS architecture to optimize browser cache-ability
Q. How do I call methods in one controller via another controller?
A. Modular Extensions (ME) aka the HMVC library allows you to do this. ME/HMVC<strike>You don’t. See http://codeigniter.com/forums/viewthread/55212/</strike> for more discussion.
Q. Why doesn’t Code Igniter support table prefixes in JOIN statements?
A. As of 1.6.0 it does
<strike>Because it doesn’t work. Use table aliases instead.</strike>
