Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>If you're interested, there's a well-established package out there that you can add to your Codeigniter project that will handle this:</p> <p><a href="https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/" rel="noreferrer">https://bitbucket.org/wiredesignz/codeigniter-modular-extensions-hmvc/</a></p> <blockquote> <p><strong>Modular Extensions</strong> makes the CodeIgniter PHP framework modular. Modules are groups of independent components, typically model, controller and view, arranged in an application modules sub-directory, that can be dropped into other CodeIgniter applications.</p> </blockquote> <p>OK, so the big change is that now you'd be using a modular structure - but to me this is desirable. I have used CI for about 3 years now, and can't imagine life without Modular Extensions.</p> <p>Now, here's the part that deals with directly calling controllers for rendering view partials:</p> <pre><code>// Using a Module as a view partial from within a view is as easy as writing: &lt;?php echo modules::run('module/controller/method', $param1, $params2); ?&gt; </code></pre> <p>That's all there is to it. I typically use this for loading little "widgets" like:</p> <ul> <li>Event calendars</li> <li>List of latest news articles</li> <li>Newsletter signup forms</li> <li>Polls</li> </ul> <p>Typically I build a "widget" controller for each module and use it only for this purpose.</p> <p>Your question was also one of my first questions when I started with Codeigniter. I hope this helps you out, even though it may be a bit more than you were looking for. I've been using MX ever since and haven't looked back.</p> <p>Make sure to read the docs and check out the multitude of information regarding this package on the Codeigniter forums. Enjoy!</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload