vBadvanced Forums  
Go Back   vBadvanced Forums > vBadvanced Products > vBadvanced CMPS > vBa CMPS v2.0 Support > "How Do I..." Questions

Reply
 
Thread Tools Display Modes
  #1  
Old 03-02-2006, 01:39 AM
led_belly led_belly is offline
Junior Member
 
Join Date: Oct 2005
Posts: 11
Default Passing Variables Around

Hi All,

I have created a new page of the type PHP File. I want to be able to pass variables in the PHP file up into bits of templates (assigned to variables). I've been playing with eval() but I can't seem to get anything to print out... Do I need to add the variables to the global scope somehow? I was looking at the modules/navigation.php file as an example but couldn't seem to replicate its successes.

Any help appreciated ;-)
Reply With Quote
  #2  
Old 03-02-2006, 07:10 PM
led_belly led_belly is offline
Junior Member
 
Join Date: Oct 2005
Posts: 11
Default Re: Passing Variables Around

Ok, so I think I have a few answers but still not getting output...

In the included PHP file I have the following test code:

<?php

$subject = 'Hello World!';
eval('$deals = "' . fetch_template('dealbits') . '";');
eval('$home["$mods[modid]"][\'content\'] = "' . fetch_template('adv_portal_deals') . '";');

//die(print_r($home));
?>

The dealsbits template just has '$subject' in it and adv_portal_deals has '$deals'. When I refresh the page nothing appears. If I uncomment the die() line the right content is present. Any ideas?
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Passing variables? cookie "How Do I..." Questions 3 09-22-2005 11:51 AM
Passing variables gabned Troubleshooting & Problems 6 09-05-2005 06:12 PM
Passing $_GET variables 1.x style doesn't seem to work in 2.x CareCureJeff "How Do I..." Questions 9 06-22-2005 10:39 AM
Error Passing a Variable juanschwartz Troubleshooting / "How do I..." Questions 8 05-25-2005 01:33 PM
Passing construct_page_nav variables to module Fargo Troubleshooting / "How do I..." Questions 1 11-13-2004 07:55 AM


All times are GMT -4. The time now is 12:35 AM.

Forums Powered by vBulletin, Copyright ©2000-2009, Jelsoft Enterprises Ltd.
Please note that vBadvanced is in no way affiliated with Jelsoft Enterprises Ltd, nor will Jelsoft be able to provide any support for our products.