Sunday 15 August 2010

php - Passing parameters in breadcrumbs -


I'm still a relative newcomer to the Zend Framework, please forgive me if this is a stupid question!

I am using breadcrumbs view assistant in the main layout of my application to provide breadcrumb functionality normally. Although I really need breadcrumbs that include parameters passing the user clicked tasks ...

So if you "From / controller / parent / id / 1" to "/ controller / Child / id / 2 "breadcrumb on the child's page" should be linked back to "/ controller / parent / id / 1" instead of "/ controller / parent /" / "/"

What are my options? Do I have a complete database of my database Need to create your Zend_Navigation tree with Green, so that every possible ID can be prepared for each action? Or when I am providing breadcrumbs, do I write my own helper to add additional parameters in the Z_Navigation_page object

The first option seems to be the path of least resistance, but seems very inefficient! However, I think it is in memory usage

Thanks for any help!

I think the answer is to use reset_perm in your navigation. Xml

inside your page you have to set reset_params = 0 as:

  & lt; Reset_params & gt; 0 & lt; / Reset_params & gt;  

See:

For example on our application, we use something like this:

  & lt; Config & gt; & Lt; NAV & gt; & Lt; FSMs & gt; & Lt; Label & gt; Home & lt; / Labels & gt; & Lt; Module & gt; Default & lt; / Module & gt; & Lt; Controller & gt; Index & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; Pages & gt; & Lt ;! - case - & gt; & Lt; Page_case & gt; & Lt; Label & gt; Case & lt; / Labels & gt; & Lt; Module & gt; Case & lt; / Module & gt; & Lt; Controller & gt; Details & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; Reset_params & gt; 0 & lt; / Reset_params & gt; & Lt; Pages & gt; & Lt ;! - Case production - & gt; & Lt; Page_case_create & gt; & Lt; Label & gt; Create & lt; / Labels & gt; & Lt; Module & gt; Case & lt; / Module & gt; & Lt; Controller & gt; Create & lt; / Controller & gt; & Lt; Action & gt; Index & lt; / Action & gt; & Lt; / Page_case_create & gt; & Lt; / Pages & gt; & Lt; / Page_case & gt; & Lt; / Pages & gt; & Lt; / FSMs & gt; & Lt; / Neo & gt;  


No comments:

Post a Comment