[ic] variables

Ron Phipps rphipps at reliant-solutions.com
Thu Jul 28 16:00:56 EDT 2005


> From: interchange-users-bounces at icdevgroup.org
[mailto:interchange-users-
> bounces at icdevgroup.org] On Behalf Of Webmaster Grandfather Clocks Plus
> Sent: Thursday, July 28, 2005 1:01 PM
> 
> Okay this should be easy, but I don't know enough about Interchange or
> Perl.
> I'm just trying to make a basic variable that I can put into some html
> code,
> this is what I'm trying to do:
> 
> [perl]
> $site = "icdevgroup";
> return $site;
> [/perl]
> 
> <html>
> <a href="www.$site.org">ICDEVGROUP.ORG</a>
> </html>
> 
> I can't get this to work, anyone have any idea on how I should go
about
> this. Sorry for the basic question.
> 
> Thanks,
> Brian

There are many ways to do this, however the way you have attempted is
not valid because $site does not mean anything to interchange when it is
not contained within a perl block.  Try one of these:

[calc]
	$Scratch->{site} = "icdevgroup";
	return;
[/calc]

<html>
<a href="www.[scratch site].org">ICDEVGROUP.ORG</a>
</html>

or

[seti site]icdevgroup[/seti]

<html>
<a href="www.[scratch site].org">ICDEVGROUP.ORG</a>
</html>

or

<html>
<a href="www.[calc] return 'icdevgroup'; [/calc].org">ICDEVGROUP.ORG</a>
</html>

Good luck,
-Ron



More information about the interchange-users mailing list