I believe wordpress writes the templates directly to a a file.

If you implemented editing the template file directly you would not have to worry about getting template from the database.

Also, I have not looked into this, maybe someone else has, but you could theorectically extend the "view" class and change the functionality from reading from a file to reading from a db table.

In your controller you would replace the $this->view variable to an instance of the class you created to extend the regular view class.  In extending your view class you would basically have to rewrite the render function and the functions dealing with "_getFileName" and similar requests.

Overall I think it would be much easier to design your application to be visually modified strictly with CSS embeded in the page.  The next easiest thing to do would be to allow the user to write directly to the template files (like Wordpress).



On 6/4/06, Petr Vytlacil <[EMAIL PROTECTED]> wrote:

But I want to users could change CSS and template. User could choose
tags that use for design gbook. So example, for Wordpress you can do
some template and use wordpress tags. Something of that kind I want to
for users. But this template (view for gbook) i want to save in
database. But I dont know how use this view from DB for controller. I
viewed class view from CakePHP and this class read all view from file.



--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to