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}
2 Answers
Another solution that works, but make ugly your template code:
{if condition=\"$year=date(\'Y\')\"}{/if} Copyright 2008-{$year} Posted: raintpl 1 of 1 people found this answer helpful. Did you? Yes No good work
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\") );and see also you can make a function like this function templete_date($value,$format = \'M jS, Y\'){ return date($format,$value); }and in tpl use {$date|templete_date} Posted: MacOS 0 of 0 people found this answer helpful. Did you? Yes No |
© Advanced Web Core. All rights reserved