Advertisement:

Author Topic: undefined variable in theme (WIP)  (Read 2113 times)

jack daniels

  • Newbie
  • *
  • Posts: 15
undefined variable in theme (WIP)
« on: April 06, 2010, 10:34:22 pm »
The theme (horizontal nav) i have styled needs a little bit of Jazz for the homepage, so im trying to pull some database info to populate the homepage, but i keep hitting an undefined variable problem,

the variables i ned to define are $item from item.php and $a from category.php (both in the themes folder) on their respective pages they work flawlessly, once used on the homepage i get the undefined error, i have added them globally to the osclass/theme.php, this removes the undefined errors but does not populate the home.php page, anyone have any ideas?
Thanks

Juan Ramón

  • Osclass Developer
  • Hero Member
  • *****
  • Posts: 2382
Re: undefined variable in theme (WIP)
« Reply #1 on: August 03, 2010, 07:08:19 pm »
Hi,

Have you tried to require the php file in home.php? The code is:

Code: [Select]
require_once 'osclass/model/Item.php';
I hope it works fine to you.