Tutorials Home Scripts Home

i have suggest about raintpl

hello, now i want make my copyright in the footer but i want it dynamic such as

Copyright © 2008-<?php echo date("Y"); ?>.
its works by the PHP now i cant make it in the RAINTPL because i must assign the Y in the PHP file first i mean php file
$tpl->assign("Y","Y");
to use it in the html
Copyright © 2008-{$Y|date}.
this becuase
{$var|function_name:par_1,par_2}
is there any way to make it
{"Y"|date}

Category: PHP Templates Engine Discussions & Requests | about: 2 months ago; | By: Gordon

Last 3 Responses

Comment form

  1. jooria About 2 months ago
    its not important to make it like that {"Y"|date}
    according to:
    raintpl_1.7.6/example.php on line 28
    the programmer made it by differant way.
    you can make it like that
    $tpl->assign( 'copyright', 'Copyright 2008-'.date("Y") );
  2. RainTPL About 2 months ago
    Another solution that works, but make ugly your template code:
    {if condition="$year=date('Y')"}{/if}
    Copyright 2008-{$year}
  3. jooria About 2 months ago
    yes its great idea too making it by if its really good idea

Leave a Comment

Comment form