-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Displaying Multiple Templates
Category:Help | Category:Help::TipsAndTricks
When you try and load more than one View (for whatever reason) in one function, you see that it simply just won't work. There are a number of ways to do this using cascaded templates or nested templates:
[b]Main template[/b] [code]<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> <head> <title>{title}</title> <link href="/css/css.css" rel="STYLESHEET" type="TEXT/CSS" /> </head>
<body>
</body> </html>[/code]
[b]Main controller[/b] [code]$maindata['navside'] = $this->parser->parse('navside',$data,true); $maindata['intro'] = $this->parser->parse('intro',$data,true); $maindata['bread'] = $this->parser->parse('bread',$data,true); $maindata['navtop'] = $this->parser->parse('navtop',$data,true); $maindata['middle'] = $this->parser->parse('cust/view',$data,true); $maindata['foot'] = $this->parser->parse('foot',$data,true);
$this->parser->parse('main',$maindata);[/code]