CodeCharge Studio
search Register Login  

Visual PHP Web Development

Visually Create Internationalized Web Applications, Web Reports, Calendars, and more.
CodeCharge.com

YesSoftware Forums -> Archive -> GotoCode Archive

 template

Print topic Send  topic

Author Message
wanaka
Posted: 10/29/2002, 6:42 PM

I have the following code to generate A-Z link. How could I output this to a variable so that I can just put {variable} in my html template

$alpha = array('ALL','A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z');

//format the text output in HTML
echo('<center><BR><font face="Verdana, Arial, Helvetica, sans-serif" size="2"><b>');
//Loop through the array
for ($i = 0; $i <= 26; $i++)
{
//otherwise call the link the relevant letter
echo('<a href="list.php?letter='.$alpha[$i].'">'.$alpha[$i].'</A> ');
}
echo('</B></font><BR><BR></center>');
Nicole
Posted: 10/31/2002, 5:29 AM

Hello,
Please refer to the article that describes how to work with templates in CC:
http://www.gotocode.com/art.asp?art_id=91&

In CCS put the HTML code on the page in the html mode and urround it with comments like:
<!-- BEGIN Tem -->
custom html {myvar}
<!-- END Tem -->

then create page Before Show event where parse the block and assign the valye to custom template variable "myvar". E.g.:
global $Tpl;
for ($i = 0; $i <= 26; $i++)
{
$Tpl->SetVar("myvar", $alpha[$i]);
$Tpl->parse("Tem", true);
}

   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

Internet Database

Visually create Web enabled database applications in minutes.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright © 2003-2004 by UltraApps.com  and YesSoftware, Inc.