On 26 Dec, Jamie Tomlinson wrote:
> Actually, Emil, I tried something like this. It didn't work on _MY_ system...
>(perhaps
> the way I have something set up or not set up as the case may be). I had to pass the
> parameters as /hpage/?id=21 (as in a CGI post/put) to get the parameters to the next
>page.
It works, but you must first enable the mechanism by
toggling the page 'Active' (there is an Active/Static
selection in the 'Modify page' dialog).
This is a nice way of concealing dynamic page functionality.
For example, the Midgard wrapper I wrote for Midgard's
presentations page works this way.
There is an active page 'slides' just below the site's root
page. This page reads the HTML files generated by MagicPoint
and sets them into the normal style of the site.
The code-init element takes the arguments and fetches
the correct content there:
<?php if ($argc == 0)
$filename = '/opt/apache/htdocs/midgard/slide-content/index.html';
elseif ($argc == 2)
$filename = '/opt/apache/htdocs/midgard/slide-content/' . $argv[0] . '/' .
$argv[1] .'.html';
elseif ($argc == 3)
$filename = '/opt/apache/htdocs/midgard/slide-content/' . $argv[0] . '/' .
$argv[1] . '/' . $argv[2] . '.html';
if ($filename && file_exists($filename)) {
$content = implode('', file($filename));
if (eregi("<BODY[^>]*>(.*)</BODY[^>]*>", $content, $regs))
$content = str_replace('SRC="',
'src="/slide-content/'.$argv[0].'/'.$argv[1].'/', $regs[1]);
} else
$site->valid = 0;
?>
Then the page content just shows that content:
&(content:h);
> Jamie
/Bergie
--
-- Henri Bergius -- +358 40 525 1334 -- [EMAIL PROTECTED] --
http://www.iki.fi/Henri.Bergius
--
This is The Midgard Project's mailing list. For more information,
please visit the project's web site at http://www.midgard-project.org
To unsubscribe the list, send an empty email message to address
[EMAIL PROTECTED]