Search code examples
phpphpbb

How to add logic to PHPBB template file?


How do we apply logic in template file of phpBB?
The way they have taught in the tutorial doesnt works for me. I have used this:

$template->assign_var('POINTER',$pointer);

and in the .tpl file

!-- IF POINTER == 1 -->
  do this  
!-- ELSE -->
  do that  
!--  ENDIF -->

But it doesn't work.


Solution

  • 1.) Are you using PHPBB3 or 2? Because the IF-Condtion exists only in Version 3.

    2.) You know that the "<"-Sign is missing at the begin of your Code?