zend-framework-mvc

How Can I Write Zend Framework URLs That Have Anchor Tags In The Body?

Using the standard MVC set up in Zend Framework, I want to be able to display pages that have anchors throughout. Right now I'm just adding a meaningless parameter with the '#anchor' that I want inside the .phtml file. <?= $this->url(array( 'controller'=>'my.controller', 'action'=>'my.action', 'anchor'=>'#myanchor' )); Thi...

Zend Framework MVC Design

I've asked this question on the zfforums as well, but I maybe I'll get a response here. So the Zend Framework is a general purpose, flexible, loosly coupled, high quality framework. However, I find some of the MVC parts inconsistent and overly complex. Hopefully some of you can justify some of the zf design decisions and answer some que...

How to serve static pages with Zend Framework

We currently employ Zend Framework and the MVC pattern on our website. We have large numbers of static pages, which are in random areas of the site. These pages are not simple HTML pages that can bypass ZF altogether... they would participate in the Zend_Layout, etc. What is the best way to serve these pages without creating a separ...

How to solve the case when users surf to index.php

In Zend framework, using the MVC, if A user surf explicitly to http://base/url/index.php instead of just http://base/url, The system thinks the real base url is http://base/url/index.php/ and according to that calculates all the URLs in the system. So, if I have a controller XXX and action YYY The link will be http://base/url/index.php/...

Zend Framework: Set Default Response Section

I'm not 100% sure how to phrase this question so please help me if you can. I have a system with modules that can be installed. I check if each module has a MenuController and if so I push an action onto the stack. The problem becomes that in each MenuController, if I don't use $this->render('index.phtml', 'menu'); then the output goes ...

Design advice for Zend application

Looking for some advice \ improvements on the structure of my application user logs in and is presented with a welcome message and a menu of options each option points to the same controller e.g OptionController but with different actions /option/abc /option/def OptionController.php { abcAction() defAction() } the reason why I have...

Layout being rendered twice

I seem to have a problem with my layout displaying twice. I was wondering if this was caused by something in my front controller plugin (see below) which utilises Zend Layout only for a particular module and not in the main application. Any answers will be much appreciated. Thanks class My_Controller_Plugin_AdoptLayout extends Zend_Cont...

Zend FlashMessenger problems

Hi, I am new to Zend framework and I have a problem. I created a controller abstract class which implements the functions like: protected function AddError($message) { $flashMessenger = $this->_helper->FlashMessenger; $flashMessenger->setNamespace('Errors'); $flashMessenger->addMessage($message); $this->view->Errors = $f...

MVC model where to put data specific checks

I'm writing my first application with Zendframework. My question is about the Model–View–Controller (MVC) architectural pattern. I currently have a model with refer to a database table. Here's the classes that I currently have : Model_Person Model_PersonMapper Model_DbTable_Person Now, I see a lot of examples on the net, but all of...

Zend Framework: Controller Plugins vs Action Helpers

Could someone give few tips and/or examples how Controller Plugins and Action Helpers are different? Are there situations where particular task could be accomplished with one but not another? For me they both look more or less the same and I'm often having trouble having to decide when to use what... Are there any big differences? ...

Get all model details in zend.

Hi, I have one doubt in zend framework. I need all model details from project which i have done in zend framework. Is there any possibility to get all model details in zend framework. Please help me.. Thanks and regards, Prasanth P ...

Zend Framework - Class Names - Change Defualt Rules :: How Can be Zend application be configured for more short class names without folders names?

Hi, In zend project have rules default for calling classes that say to put folder class structure before class name. Example: class Application_Model_DbTable_Albums means: that this class inside folders: Application->Model->DBTable, if its called Just class Albums he will be unrecognized. How Can be Zend application be configured fo...

Executing a function before view renders

I'm new to Zend Framework MVC. I love a lot of things about working with an MVC environment, but find myself confused about it structurally sometimes. I have a simple task, I'd like to flag certain users on our site to track their movements. For this I've set up a simple table in the database, and started to code in my _initTracking() f...

Zend_Framework -- How do I put Javascript in the layout?

I need a method of inserting javascript which is controller/action specific into a layout. That javascript needs to go inside the <head> of the document, far from where normal content is placed. I already have an infrastructure in place which allows use of multiple views per page, and the Zend_Layout I already have takes full advantage o...

Where create cookie that holds only user id in Zend MVC project?

Hi, I am working with Zend MVC project. MY mission: add cookie that will have only user unique id. Problem:I don't know where create a cookie. Options to place create a cookie, that I thing about: bootstrap.php init()/run() index.php (not make sense) In Controllers My project structure: application/bootstrap.php public/index.ph...

Does Zend_Registry live until next user request?

Hi, Does Zend_Registry live until next user request? I put this code in the end of index.php file in zend project:(The code inside existing zend website) Trial code: //end of index.php file Bootstrap::run(); //trial for find out the life of Zend_Registry. $registry = Zend_Registry::getInstance(); if (!isset($regi...

Zend Framework :: How should title html element get from view?(set view->headTitle())

Hi, Zend Framework :: How should title html element get from view?(set view->headTitle()). Example of view title output source: (I need to get: some browser title) <title> some browser title </title> My Code that print huge array: $this->view->headTitle('some browser title');//set working echo var_export($this->headTitle()); //get...