2009/4/19 Jason La <jasonla@gmail.com>
Ok, so simplifying, the row will also have a field 'viewPath' other than 'title', 'text', 'date'...
So I guess you will have a select that contains the paths to all the views in a certain folder. You can generate it with opendir() or DirectoryIterator.
So in the action used to display the article you you would call Zend_Controller_Action::renderScript($article->viewPath);
I'm a ZF newbie, so please bear with me. I would like to store views
for the front end of a website in a database instead of the file
system.
Ok, so simplifying, the row will also have a field 'viewPath' other than 'title', 'text', 'date'...
The admin backend will use the standard method of storing view on the
filesystem using the standard directory structure. But for the
frontend, my web app needs to allow administrators to select how
content is displayed on the frontend.
So I guess you will have a select that contains the paths to all the views in a certain folder. You can generate it with opendir() or DirectoryIterator.
For example, if it were a standard CMS, the admin control panel would
use the standard filesystem structure. When a user creates a new
article for display to visitors, they should be able to select which
template is used for display.
So in the action used to display the article you you would call Zend_Controller_Action::renderScript($article->viewPath);
--
Giorgio Sironi
Piccolo Principe & Ossigeno Scripter
http://ossigeno.sourceforge.net
没有评论:
发表评论