CodeCharge Studio
search Register Login  

Web Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> PHP

 How to Include pages within html pages.

Print topic Send  topic

Author Message
aakici


Posts: 49
Posted: 01/23/2005, 4:54 AM

I write some codes for general use of me. For example; format numbers, get some money conversions, etc. I use them almost every page i wrote. I write include pages and include them in php pages. But, i can't do this for html codes. How can i use include pages in html pages?
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
mrachow


Posts: 509
Posted: 01/23/2005, 9:56 AM

In Toolbox on tab Forms there is an template Include Page.
Mostly this feature is used to include header and footer pages/page parts.

_________________
Best regards,
Michael
View profile  Send private message
peterr


Posts: 5971
Posted: 01/23/2005, 11:07 AM

You cannot include CCS pages in non-CCS HTML pages. However, you can create a CCS page based on your HTML.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
aakici


Posts: 49
Posted: 01/23/2005, 12:17 PM

I don't know if it is possible. Hovewer, i know different use of include pages is maintained other programming languages, for example, pascal, vb, delphi (units). I think there must be a way.
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
peterr


Posts: 5971
Posted: 01/23/2005, 12:45 PM

This really depends on the situation & approach. Not every Delphi program can be included in other non-Delphi program. Otherwise why people would need to create Delphi or ActiveX components?
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com
View profile  Send private message
aakici


Posts: 49
Posted: 01/23/2005, 12:55 PM

I don't mean that. I can't wish delphi programs can be included in other non-delphi program. The situastion i tried to explain is including a html code without rewriting it in other html page. You can include a DElphi program (called unit.) in other Delphi program.
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
aakici


Posts: 49
Posted: 01/23/2005, 12:56 PM

And as you know, you can include a php page in another php page. this is what i meant.
_________________
Regards,
M.Alpaslan AKICI
View profile  Send private message
Matt
Posted: 02/18/2005, 7:12 AM

I think the easiest way to do it in html is to use the embed tags, I'm looking for an easier way at the moment myself. I hope you found it already since no one has written here for like a month
feha


Posts: 712
Posted: 02/20/2005, 1:05 AM

You must use functions
and functions has to return your HTML in the string.
In before show event you can call your function and set result in to HTML label within an include page.

function test()
{
$test="<strong>Hello World!";
return $test;
}


$somegrid->$some label->SetValue(test());


_________________
Regards
feha

www.vision.to
feedpixel.com
View profile  Send private message
jeverhart
Posted: 02/23/2005, 2:47 PM

Not sure if I quite understand the question, but for sure we include non-CCS items inside of CCS pages all the time. Just create the non-CCS HTML file (for example, "footer.inc"). Then in the Common.php we add this little function:

function include_file($template_variable_name, $path_and_file){
global $Tpl;
$path_and_file = realpath($path_and_file);
$Tpl->SetVar("$template_variable_name", join('',file($path_and_file)));
}
Then for your CCS page in a Before Show event, add the code:

global $Tpl;
include_file("myfooter", "../includes/footer.inc") // put your actual path and file name here
$Tpl->SetVar("myfooter");

Finally, in your HTML, add this template variable where you want the file included:
{myfooter}

We do this on all our projects with no problems

Add new topic Subscribe to topic   


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

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


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