Login   Register  
PHP Classes
elePHPant
Icontem

File: demo_1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of bonvga  >  SmartyX  >  demo_1.php  >  Download  
File: demo_1.php
Role: Example script
Content type: text/plain
Description: demo 1
Class: SmartyX
Extend Smarty to use ModeliXe notation
Author: By
Last change:
Date: 2005-07-08 12:16
Size: 1,550 bytes
 

Contents

Class file image Download
<?php
    
// demo 1 - imbricate

    
$smartyx->smxUseRelativePath(false);
    
    
$smartyx->smxSetTemplate("","demo_bloc.html");
    
$smartyx->smxAssign("color","#FFFF99");
    
$smartyx->smxAssign("title","bloc 1");

    
$smartyx->smxSetTemplate("bloc1","demo_bloc.html");
    
$smartyx->smxAssign("bloc1.color","#99FFFF");
    
$smartyx->smxAssign("bloc1.title","bloc 1.1");
    
    
$smartyx->smxSetTemplate("bloc1.bloc1","demo_bloc.html");
    
$smartyx->smxAssign("bloc1.bloc1.color","#99FF99");
    
$smartyx->smxAssign("bloc1.bloc1.title","bloc 1.1.1");

    
$smartyx->smxSetTemplate("bloc1.bloc2","demo_bloc.html");
    
$smartyx->smxAssign("bloc1.bloc2.color","#9999FF");
    
$smartyx->smxAssign("bloc1.bloc2.title","bloc 1.1.2");

    
$smartyx->smxSetTemplate("bloc1.bloc4","demo_bloc.html");
    
$smartyx->smxAssign("bloc1.bloc4.color","#FF9999");
    
$smartyx->smxAssign("bloc1.bloc4.title","bloc 1.1.3");

    
$smartyx->smxSetTemplate("bloc2","demo_bloc.html");
    
$smartyx->smxAssign("bloc2.color","#FF99FF");
    
$smartyx->smxAssign("bloc2.title","bloc 1.2");

    
$smartyx->smxSetTemplate("bloc2.bloc1","demo_bloc.html");
    
$smartyx->smxAssign("bloc2.bloc1.color","#FF9999");
    
$smartyx->smxAssign("bloc2.bloc1.title","bloc 1.2.1");

    
$smartyx->smxSetTemplate("bloc2.bloc1.bloc1","demo_text.html");
    
$smartyx->smxSetTemplate("bloc1.bloc2.bloc3","demo_text.html");
    
$smartyx->smxSetTemplate("bloc1.bloc3","demo_text.html");
    
$smartyx->smxSetTemplate("bloc1.bloc5","demo_text.html");

    
$smartyx->smxDisplay();

    
/*echo "<pre>";
    print_r($smartyx);
    echo "</pre>";*/
?>