[ic] Component's, Scratch Variables, and Conditional Statements

Himem Inc interchange at himem.net
Wed Aug 20 18:11:23 EDT 2003

I am trying to make a simple dynamic header.  I have it setup as a 
component already, and it works.  I do a [component header] and I get 
what I want.  I want do be able to do something such as [component 
header section main], or somehow define the section I want to display.  
On the header component, I want to have a look up table.. something like 

$table ( 'main' => 'image.jpg', 'page1' => 'image1.jpg');
$sectionImage = $table[$section];

print "<img src="header.jpg"><img src="$sectionImage">";

I am stuck trying to figure out how to pass the section however.  I have 
tried looking through the foundation, but can't get it to work right.

[control reset=1]
[component header]

I do something like that, then in my header I have:

[if scratch section]
I was passed a section variable

It does not seem to show up.  Could someone email me some code that will 
let me set a variable/scratch value on a page, then call a component, 
and have the component know about that data (and also post the component 
access code).


More information about the interchange-users mailing list