😎
ClipBucket
  • What is ClipBucket
  • Fundamentals
    • Files Structure
    • Basic Understandings
      • Videos Class & Functions
      • User Class & Functions
      • Template Class & Functions
      • DB.class & Functions
      • User Levels & Permissions
  • Guides
    • Template Customization
    • Plugin Development
    • Anchors, Functions & Filters
    • Clipbucket template files
    • Functions
      • add_admin_menu
      • get_thumb
      • FlashPlayer
      • {ANCHOR }
      • add_js
      • lang
      • {videoLink }
      • get_users
      • get_videos
  • Group 1
    • Users
Powered by GitBook
On this page
  1. Fundamentals
  2. Basic Understandings

Template Class & Functions

//Class is initated as  $cbtpl
$cbtpl->Fetch($name);

Absolute Path of the Class File /includes/classes/template.class.php

Absolute Path of the functions file /includes/functions_template.php

Methods in Object
Functions
Purpose

::fetch($file_path)

fetch($name, bool $inside)

This fetches a smarty template. in $cbtl->fetch() we provide an absolute path of the Template file while in fetch we only mention the file name so that we dont have to provide aboslute.

in fetch function, LAYOUT directory is automaticall appended if $inside is set to true

::assign($var, $value)

assign($var, $value)

Assign a variable that can be used in smarty template

Template($file, boolean $layout)

Add a template file in a List of files to load when Displa_it(); is called

display_it();

Display it will render body.html found in Layout dir and loop all templates files that are assigned using Templatete(); method

Further read

How to Edit a Template

PreviousUser Class & FunctionsNextDB.class & Functions

Last updated 3 years ago