A community in which webmasters can ask for help with topics such as PHP coding , MySQL , IT jobs, web design, IT security.
Current location:homephp forumphp talk in 2009 yearWhere do I save partial (views) in Zend Framework, to be accessible for all Views in my App? - page 1
User InfoPosts
Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?#1
I have several view Partials (like paginator partial) which I want them to be available
To all view scripts in my application.
Is there a directory I can put partial vies in, and they will be available to all?
Or, how do I define such a directory?

posted date: 2009-04-13 19:37:00


Re: Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?#2
I had made out the solution of this problem. click to view my topic...

hope that hepls.

posted date: 2009-04-13 19:37:01


Re: Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?#3
You can create a folder in the views folder with any name and from your views you would call a partial using the following code and as the second argument pass an array of values which would be used within the partial.$this->partial((your-partial-dir/your-partial.phtml(, array((var(=>$myVar));Note that you can include and render any partial view from any view referring to the views folder as the root. And you would access variables within the partial using the $this identifier to refer to each variable as though it was a member of the partial object://your-partial.phtml file$this->var;Alternatively you can also create a view helper - a view helper is a class that is declared and extended from the Zend_View_helper class and can be called from a view as though it was a member function.For more on view helpers you can refer to this write up on Zend http://devzone.zend.com/article/3412-View-Helpers-in-Zend-Framework

posted date: 2009-04-13 22:24:00


Re: Where do I save partial (views) in Zend Framework, to be accessible for all Views in my App?#4
Why is ZF using here in the docu the following path? application/modules/default/views/menu.phtml: framework.zend.com/manual/en/…

posted date: 2011-10-28 03:13:00


select page: « 1 »
Copyright ©2008-2017 www.momige.com, all rights reserved.