Phocha Menu Module: Bug fix + Enhancement
Posted: 02 May 2010, 00:11
Hi everyone, I just wanted to share a bug fix and a small enhancement to the phoca menu module in the hopes that it will make it into the next release and/or be helpful to some other people.
You can find the modified version of Phoca here: http://www.yagudaev.com/download/mod_ph ... dified.zip. (Note: please copy and paste the link to your browser in order for it to work, clicking the link won't work).
Bug: There is a navigation problem, where the user is directed to the wrong place in the joomla website but the right place in the Phoca component.
Steps to reproduce: Navigate to your website, click on "Gallery"(or whatever you call it) on the websites main navigation. Locate the Phoca Menu module and click on one of the displayed categories.
Result: User is presented with the correct category in phoca gallery, but is no longer located under the "Gallery" menu item in joomla.
Expected Result: User is presented with the right category in phoca gallery under the "Gallery" menu item.
Fix: Found a small difference between the link used in the component when opening a category and the module. Using the same approach in the module as in the component proved to solve this issue.
Enhancement: User wants to be able to select a parent category to display instead of displaying all categories at the root.
Development: Used phoca image module as a model and added a new drop down box to select parent category. Hooking up the all thing was easy since the code uses a recursive function that already expects a category id, all I had to do was provide that id up front.
Hope that makes sense. Please let me know if you have any questions.
You can find the modified version of Phoca here: http://www.yagudaev.com/download/mod_ph ... dified.zip. (Note: please copy and paste the link to your browser in order for it to work, clicking the link won't work).
Bug: There is a navigation problem, where the user is directed to the wrong place in the joomla website but the right place in the Phoca component.
Steps to reproduce: Navigate to your website, click on "Gallery"(or whatever you call it) on the websites main navigation. Locate the Phoca Menu module and click on one of the displayed categories.
Result: User is presented with the correct category in phoca gallery, but is no longer located under the "Gallery" menu item in joomla.
Expected Result: User is presented with the right category in phoca gallery under the "Gallery" menu item.
Fix: Found a small difference between the link used in the component when opening a category and the module. Using the same approach in the module as in the component proved to solve this issue.
Enhancement: User wants to be able to select a parent category to display instead of displaying all categories at the root.
Development: Used phoca image module as a model and added a new drop down box to select parent category. Hooking up the all thing was easy since the code uses a recursive function that already expects a category id, all I had to do was provide that id up front.
Hope that makes sense. Please let me know if you have any questions.