Note that there are some explanatory texts on larger screens.

plurals
  1. POZend render static / dynamic with multi controllers
    primarykey
    data
    text
    <p>I'm pretty new to Zend (read the documents concerning routers and controllers).</p> <p>My <code>StaticController</code> and <code>IndexController</code> :</p> <pre><code>class StaticController extends Zend_Controller_Action { public function displayAction() { $page = $this-&gt;getRequest()-&gt;getParam('filename'); $this-&gt;render($page); } } class IndexController extends Zend_Controller_Action { public function indexAction() { $albums = new Application_Model_DbTable_Albums(); $this-&gt;view-&gt;albums = $albums-&gt;fetchAll(); } public function registerAction() { ... } } </code></pre> <p>application.ini :</p> <pre><code>resources.router.routes.staticpage.route = /:filename resources.router.routes.staticpage.defaults.controller = static resources.router.routes.staticpage.defaults.action = display </code></pre> <p>My static content urls are : <code>site.com/faq</code> <code>site.com/privacy</code> <code>...</code></p> <p>These work, however others, such as <code>site.com/register</code> uses the <code>StaticController</code> rather than the <code>IndexController</code>, I can't say that I suprised by this behavior. </p> <p>These static pages (about us, terms and cond...) need to be included in the zend logic for <code>.po</code> translation.</p> <p>I can think of many diffrent ways to achieve this outside the Zend framework, but would really like to do it the proper <em>zend</em> way.</p> <p><strong>How can I distinguish static and dynamic content, and still keep pretty urls?</strong></p> <p>Any help would be much appreciated !</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload