[opencms-dev] AW: [opencms-dev] Export question (stylesheet, images, dynamic

Björn Aberti bjoern_al at hotmail.com
Tue Jul 22 11:43:00 CEST 2003


Hello Thomas,

First thanks for your great helpfulness. I'm taking reference to your first 
mail:

>Create a new "page" with the extension ".php", add a property
>e. g. "php_code=/my/php/test.php" and include the code by your template
>by reading the property, so you can use different code for each page.

>Take a look at http://62.245.145.118/de/ ; it combines PHP and OpenCms,
>e. g. the forum template is done by OpenCms resp. all templates, and
>they use sometimes also PHP-content.

First what I will do know, is to get running the PHP scripts, I'm ignoring 
the navigation problem at this time...

I think I've done what you have advised. I've created a new template in my 
frametemplate named "myfirstphpscript". There I have included my php code 
(it's just a phpinfo() and an echo for testing). In my index.php file (thats 
the file where the script should be included) I've specified an ELEMENTDEF 
(name = phpscript) which calls the TEMPLATE "myfirstphpscript" by 
TEMPLATESELECTOR. This element I include via "element name = phpscript" 
above.

My index.php file looks rather lilke this:

<![CDATA[
<h1>PHP TEST</h1>
]]>
<element name="phpscript"/>

<ELEMENTDEF name="phpscript"/>
<TEMPLATESELECTOR>myfirstphpscript</TEMPLATESELECTOR>
</ELEMENTDEF>

My frametemplate looks like this:

....
<TEMPLATE name="myfirstphpscript">

<?php

echo "hello";
phpinfo();
?>

</TEMPLATE>

It's actually very close to the chapter 17.3.7 Javascript Blocks in the 
documentation. I dont' really know if it is that what you have suggested me, 
cause I don't know what you mean by that, respectively how to realize that:

>add a property e. g. "php_code=/my/php/test.php" and include the code by 
>your template
>by reading the property

My problem is, that the php code isn't inserted into them html source code. 
If I view the source code, I only see
"<h1>PHP TEST</h1>" and the rest of the HTML stuff created by my templates. 
If I watch the page, there is also nothing to see (except "PHP TEST", of 
course).

Could you please help me another time?

Best regards

Björn

_________________________________________________________________
MSN - More useful every day http://www.msn.de




More information about the opencms-dev mailing list