Welcome Guest, Not a member yet? Register   Sign In
how can i integrate layout and modular extensions??

i have integrate modular extensions in my application. now i need to add a layout system in my application.
i m working on it..
bt can anyone provide me any solution regarding this....
can i have any library ?
wht will be the best soultion?
plz help me


did you look at this thread ?

[eluser]Phil Sturgeon[/eluser]
Here is the latest from my Layout Library which is designed to work with matchbox (default configuration) or to use subdirs/normal CI layout instead.

Might look a little crazy, but the basics are:

$this->layout->title('Whatever'); // Sets the page title

$this->layout->create('view', $data); // Loads view.php from your current module view folder

The rest of it is for guessing breadcrumbs, guessing titles based on modules/controllers/etc which you may not need.

An example layout file can be the following:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
&lt;html &gt;
    &lt;meta http-equiv="content-type" content="text/html; charset=utf-8" /&gt;


<div id="header">
    <h1>Site name.com</h1>

<div id="content">

    <div id="left-column" class="sidebar">
        <div id="navigation">


    <div id="right-column">

    &lt;?=$page_output; ?&gt;


<p id="footer">Made by Rick Waller</p>


Page title will show your manually set page title, or make a good guess based on odule and controller.

Page output will be the content of the view file you passed it.

Also handy stuff:

$this->layout->wrap_mode(FALSE); // Will just output the view file, without this wrapper file

$this->layout->create('<b>Hello!</b>'); // This makes the output body just a bold hello, and will still give you your title, your breadcrumbs, etc.

Its not perfect and needs documenting, but should help. ^_^

Theme © iAndrew 2016 - Forum software by © MyBB