Welcome Guest, Not a member yet? Register   Sign In
Template Engine / Easier View Library
#2

[eluser]wiredesignz[/eluser]
Usage: Rendering page parts only

Autoload library template.php

Code:
$this->template->assign_tpl( array(
            'header'       => 'header',      // name of the content part => file name to load
            'header_write' => 'header_write',
            'sidebar'      => 'sidebar_posts_form',
            'editorjs'     => 'editorjs',
            'posts_form'   => 'posts_form',
            'footer'       => 'footer',
      ));
            
      $this->template->assign_global( array(    // all the above parts have access to this data
            'postid'          => $this->postID,
            'users'           => $users,
            'categories'      => $categories,
            'writestyle'      => "active",
            'writepostsstyle' => "active",
            'pagetitle'       => "Administration Panel - Manage Posts",
            'categoryids'     => $categoryids,
            'directory'       => 'admin/',       // the template source directory
      ));
            
            $this->template->render();


Messages In This Thread
Template Engine / Easier View Library - by El Forum - 12-13-2007, 04:44 PM
Template Engine / Easier View Library - by El Forum - 12-13-2007, 04:51 PM
Template Engine / Easier View Library - by El Forum - 12-13-2007, 05:15 PM
Template Engine / Easier View Library - by El Forum - 12-13-2007, 06:15 PM
Template Engine / Easier View Library - by El Forum - 12-14-2007, 12:07 AM
Template Engine / Easier View Library - by El Forum - 12-14-2007, 08:08 AM
Template Engine / Easier View Library - by El Forum - 12-14-2007, 11:15 AM



Theme © iAndrew 2016 - Forum software by © MyBB