Welcome Guest, Not a member yet? Register   Sign In
class Page and Db
#3

[eluser]cPage[/eluser]
A good thing about this library, its that it give you all the flexibility that you want. For exemple you can set a view as a bloc of code and use it anywhere in the controller with the function get_view();

Code:
$this->page->set_html('h3','Lorem Ipsum');
$this->page->set_html('p','Lorem Ipsum is simply dummy text of the printing and typesetting industry.
Lorem Ipsum has been the industry standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled
it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.');
$this->page->set_html('div',$this->page->create_html(),array('class'=>'box'));
$this->page->set_html('aside',$this->page->get_html(),array('class'=>'grid_3'));
$this->page->set_view('aside',$this->page->get_html());

The function set_html takes 3 parameters. 2 are optional. set_html($tag [,mixed $value][,array $attributes])

create_html() compile into 1 string all the previous sets.
get_html() return the last compress string of html that comes from create_html or set_html.




Messages In This Thread
class Page and Db - by El Forum - 04-16-2012, 09:23 AM
class Page and Db - by El Forum - 05-06-2012, 10:09 PM
class Page and Db - by El Forum - 05-06-2012, 10:35 PM



Theme © iAndrew 2016 - Forum software by © MyBB