views:

30

answers:

2

Hi guys, I have a website that has around 10 pages. Only one of those pages uses Zend (to integrate with Google gData).

Right now, it's just all coded into that one page, but I'm wanting to learn how to use Zend Framework.

How do you handle basic-relatively static php pages within Zend Framework?

Do you just stick the whole individual pages into their own respective views and then have to common stuff in the layout, and not worry about a model and controller for those pages?

in general, is MVC accepted and appropriate technology for general "web-design" work?

A: 

Make one controller with default action (where you redirect all the static pages). Ten inside the default view include pages based on some param (from url). If you're concerned about speed, you can also generate the files manually and put them in desired directory structure. Add lines testing if file exists () into your .htaccess and server static pages statically ;)

RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule !\.(js|ico|gif|jpg|png|css|html|doc|swf)$ /index.php
Tomáš Fejfar
+1  A: 

For 10 (relatively) static pages I'd use Zend_Tool from the command line:

zf create project myproject
cd myproject
zf create action1
..
zf create action10

Then copy your existing page to action-n, edit views .phtmls and IndexController actions. Voilà!

takeshin