phpBB Template Class Problem

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

Alright, I'm working on my CMS and for my first release I'm going to use the phpBB3's template system... well, I got it working but I can't seem to make the iteration to work...

My PHP for it is:
Code: [ Select ]
$pages = array(
array(
    'U_PAGE'    => 'Page 1',
    'T_PAGE'    => 'Page 1',
    'L_PAGE'    => $_root_path . 'page_1.php'
),
array(
    'U_PAGE'    => 'Page 2',
    'T_PAGE'    => 'Page 2',
    'L_PAGE'    => $_root_path . 'page_2.php'
),
array(
    'U_PAGE'    => 'Page 3',
    'T_PAGE'    => 'Page 3',
    'L_PAGE'    => $_root_path . 'page_3.php'
));
$template->assign_vars(array(
   'pages' => $pages
));
  1. $pages = array(
  2. array(
  3.     'U_PAGE'    => 'Page 1',
  4.     'T_PAGE'    => 'Page 1',
  5.     'L_PAGE'    => $_root_path . 'page_1.php'
  6. ),
  7. array(
  8.     'U_PAGE'    => 'Page 2',
  9.     'T_PAGE'    => 'Page 2',
  10.     'L_PAGE'    => $_root_path . 'page_2.php'
  11. ),
  12. array(
  13.     'U_PAGE'    => 'Page 3',
  14.     'T_PAGE'    => 'Page 3',
  15.     'L_PAGE'    => $_root_path . 'page_3.php'
  16. ));
  17. $template->assign_vars(array(
  18.    'pages' => $pages
  19. ));

and then my HTML is
Code: [ Select ]
<ul>
    <!-- BEGIN pages --><li>
        <a href="{pages.U_PAGE}" title="{pages.T_PAGE}">{pages.L_PAGE}</a>
    </li><!-- END pages -->
</ul>
  1. <ul>
  2.     <!-- BEGIN pages --><li>
  3.         <a href="{pages.U_PAGE}" title="{pages.T_PAGE}">{pages.L_PAGE}</a>
  4.     </li><!-- END pages -->
  5. </ul>

It doesn't work though... I'm not sure what to do right now with it... or how to make it work. Any solution as to how to fix this thing? Thanks in advance.
  • Anonymous
  • Bot
  • No Avatar
  • Posts: ?
  • Loc: Ozzuland
  • Status: Online

Post 3+ Months Ago

  • Bogey
  • Genius
  • Genius
  • Bogey
  • Posts: 8388
  • Loc: USA

Post 3+ Months Ago

Never mind. Just figured out how to use that... My hiatus from programming was a tad bit too long :lol:

Post Information

  • Total Posts in this topic: 2 posts
  • Users browsing this forum: No registered users and 86 guests
  • You cannot post new topics in this forum
  • You cannot reply to topics in this forum
  • You cannot edit your posts in this forum
  • You cannot delete your posts in this forum
  • You cannot post attachments in this forum
 
 

© 1998-2014. Ozzu® is a registered trademark of Unmelted, LLC.