materix
|
| Posted: 03/13/2005, 11:13 AM |
|
Hi.
I am using CCS, PHP and mysql.
I have created one standard page (index.php) with a header, body and footer. Then I have created many different content-pages that are includable.
My plan is to include a content-page in the body-area of the standard-page decided by a url-parameter.
E.g. index.php?page=1 then include content-page_1
index.php?page=2 then include content-page_2
How do I achieve this?
|
|
|
 |
RonB
Posts: 228
|
| Posted: 03/14/2005, 3:00 AM |
|
Modify the index.php code page directly in the white area underneath the other include statements:
if (CCGetParam("page",'')=1)
{
include(RelativePath . "/first_include_page.php");
}elsif (CCGetParam("page",'')=2)
{
include(RelativePath . "/second_include_page.php");
}
etc etc. Using case would be more elegant.
Ron
|
 |
 |
materix
|
| Posted: 03/14/2005, 8:57 AM |
|
Hi Ron. Thx for your reply.
Quote :Modify the index.php code page directly in the white area underneath the other include statements:
Does not this mess up the automatic code-generation in ccs? Should not all written code be placed in the events-file? Or is ok to write code directly in the generated page?
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/14/2005, 10:37 AM |
|
metrix,
You can add new code in the generated page if you place it within the white code area, usually near the beginning of the page. We recommend leaving the grey code blocks unmodified.
Alternatively, you can include several pages next to each other, then hide the ones that you don't need in the Before Show event of the page.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
materix
|
| Posted: 03/15/2005, 2:20 AM |
|
Peterr, thx for the reply.
Quote :Alternatively, you can include several pages next to each other, then hide the ones that you don't need in the Before Show event of the page.
If I include several (large) pages and then hide all pages except a single page - will all pages be loaded or only the one that is visible?
|
|
|
 |
peterr
Posts: 5971
|
| Posted: 03/15/2005, 11:08 AM |
|
I think so, because we don't know what those pages are doing (they may be sending emails for example).
However, you may be able to implement some simple logic in those includable pages that would prevent them from executing, though I don't have specific examples available.
_________________
Peter R.
YesSoftware Forums Moderator
For product support please visit http://support.yessoftware.com |
 |
 |
|