The easiest way would be to write the content to a temp file, then
render that temp file as an element.

This would be slow if done on every request, so some cacheing
mechanism is a must.

Beware of security implications though. This will effectively allow
people to execute arbitrary php on your webserver, and sanitizing PHP
code is not as easy as it sounds. Make absolutely sure you need this
level of customization before you allow it.

On Jan 30, 9:20 am, "Novice Programmer" <[EMAIL PROTECTED]>
wrote:
> Wow.. i got stuck in a similar problem some time back, but after certain
> thoughts i shifted on to the html/plain php format only because i never
> thought that my administrators would be equipped with cake terminology, but
> ur Q has set me thinking again...
>
> Thanks.
>
> On 1/30/08, Unite <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
> > Well here is what im trying to do. I have set up a layout in cakephp
> > that will be global. I have a admin section where people can update
> > the contents of the "$content_for_layout" (not really but a <table></
> > table> contents within $content_for_layout) by using a text area to
> > hard input html/php code into the database. So in a nut shell. The
> > user inputs there html/php into a textbox in the admin section which
> > then gets saved to the DB. When the specific page is loaded it looks
> > in the DB for the code that was input in admin and displays it.
> > I can do this by using html tags for "inputs" but want to keep to the
> > cake format of echo $html->input("").
> > I have seen the mention of using eval() but that only evaluates php.
> > Hopefully the problem is better understood now.
>
> --
> Thanks & Regards,
> Novice (http://ishuonweb.wordpress.com/).
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to