----- Original Message -----
From: "Daniel S. Reichenbach" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Wednesday, May 23, 2001 2:10 PM
Subject: RE: [midgard-user] Selecting page elements based on arguements


> > > using mgd_template it returns executes the element and displays
> > > it's content again.
> >
> > what do you mean by "it returns executes" ?
> > it should only display the element content, try to enclose it with
> > htmlentities():
> >
> > <pre><? echo htmlentities(mgd_element($action)); ?></pre>
> I should buy a bottle of english :-) I meant that it displays the
> elements content as HTML. I've got a default element, which contains
> just simple HTML and this is being displayed.

ok, next step now:
<pre><?
$code = mgd_element($action);
echo htmlentities($code);
?></pre><hr><?
eval("?>".$code."<?");
?><hr><?
mgd_eval("?>".$code."<?");
?>

the first section should still display the content of the element, the
second one should execute it as well as the third one.

Explanations:
the preparser code in midgard translate
<[something]>
into
<? mgd_eval("?>".mgd_template("something")."<?"); ?>

and it also translate eval() into mgd_eval()

> Daniel



---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to