how can i integrate layout and modular extensions?? |
[eluser]Unknown[/eluser]
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
[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: Code: $this->layout->title('Whatever'); // Sets the page title 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: Code: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 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: Code: $this->layout->wrap_mode(FALSE); // Will just output the view file, without this wrapper file Its not perfect and needs documenting, but should help. ^_^ |
Welcome Guest, Not a member yet? Register Sign In |