Re: [fw-general] Zend Navigation ignoring Action section of config

2010-02-21 Thread Hector Virgen
It helps to specify the route because Zend_Navigation uses the current route
to create the url instead of the default route. So your navigation should
look more like this:

home
labelHome/label
controllerindex/controller
actionindex/action
*routedefault/route*
/home

--
Hector


On Sun, Feb 21, 2010 at 10:14 PM, Cameron themsel...@gmail.com wrote:

 Hi everyone, I've got an unusual issue with Zend_Navigation that seems like
 it should work correctly, but isn't.

 Here's a basic example of the config...


 nav
 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 /home
 admin
 labelAdmin/label
 controlleradmin/controller
 actionindex/action
 /admin
 booking
 labelBookings/label
 controllerbooking/controller
 actionlist/action

 pages
 list-booking
 labelList bookings/label
 controllerbooking/controller
 actionlist/action
 /list-booking
 calendar
 labelBooking calendar/label
 controllerbooking/controller
 actioncalendar/action
 /calendar
 add-booking
 labelAdd booking/label
 controllerbooking/controller
 actionnew/action
 /add-booking
 /pages
 /booking
 /nav

 The problem exists when you're not on a URL that includes both controller
 and action parts. If I go to http://example.com/base/url/admin, it
 defaults to the index action, which is fine, but in the menu above none of
 the actions display, so all of the Booking menus all say just
 http://example.com/base/url/booking. Once you're actually in the menu
 and using links generated by the menu, it all seems to work fine. Has anyone
 got any idea why it is behaving this way?



Re: [fw-general] Zend Navigation ignoring Action section of config

2010-02-21 Thread Cameron
Ahh ok, thanks, that works. But if there's no route in either the request or
the config it defaults to... breaking the URLs?

On Mon, Feb 22, 2010 at 2:24 PM, Hector Virgen djvir...@gmail.com wrote:

 It helps to specify the route because Zend_Navigation uses the current
 route to create the url instead of the default route. So your navigation
 should look more like this:

 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 *routedefault/route*
 /home

 --
 Hector



 On Sun, Feb 21, 2010 at 10:14 PM, Cameron themsel...@gmail.com wrote:

 Hi everyone, I've got an unusual issue with Zend_Navigation that seems
 like it should work correctly, but isn't.

 Here's a basic example of the config...


 nav
 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 /home
 admin
 labelAdmin/label
 controlleradmin/controller
 actionindex/action
 /admin
 booking
 labelBookings/label
 controllerbooking/controller
 actionlist/action

 pages
 list-booking
 labelList bookings/label
 controllerbooking/controller
 actionlist/action
 /list-booking
 calendar
 labelBooking calendar/label
 controllerbooking/controller
 actioncalendar/action
 /calendar
 add-booking
 labelAdd booking/label
 controllerbooking/controller
 actionnew/action
 /add-booking
 /pages
 /booking
 /nav

 The problem exists when you're not on a URL that includes both controller
 and action parts. If I go to http://example.com/base/url/admin, it
 defaults to the index action, which is fine, but in the menu above none of
 the actions display, so all of the Booking menus all say just
 http://example.com/base/url/booking. Once you're actually in the menu
 and using links generated by the menu, it all seems to work fine. Has anyone
 got any idea why it is behaving this way?





Re: [fw-general] Zend Navigation ignoring Action section of config

2010-02-21 Thread Hector Virgen
No, it defaults the the route that matched the current request. It works
similarly to the url view helper.

Do you have any custom routes set up? It seems to me that you may have one
that looks something like like this:

/:controller

It seems like that's the case because normally with only the default
built-in route your navigation should have worked since all of your pages
would have used the default route when requested.

--
Hector


On Sun, Feb 21, 2010 at 10:31 PM, Cameron themsel...@gmail.com wrote:

 Ahh ok, thanks, that works. But if there's no route in either the request
 or the config it defaults to... breaking the URLs?

 On Mon, Feb 22, 2010 at 2:24 PM, Hector Virgen djvir...@gmail.com wrote:

 It helps to specify the route because Zend_Navigation uses the current
 route to create the url instead of the default route. So your navigation
 should look more like this:

 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 *routedefault/route*
 /home

 --
 Hector



 On Sun, Feb 21, 2010 at 10:14 PM, Cameron themsel...@gmail.com wrote:

 Hi everyone, I've got an unusual issue with Zend_Navigation that seems
 like it should work correctly, but isn't.

 Here's a basic example of the config...


 nav
 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 /home
 admin
 labelAdmin/label
 controlleradmin/controller
 actionindex/action
 /admin
 booking
 labelBookings/label
 controllerbooking/controller
 actionlist/action

 pages
 list-booking
 labelList bookings/label
 controllerbooking/controller
 actionlist/action
 /list-booking
 calendar
 labelBooking calendar/label
 controllerbooking/controller
 actioncalendar/action
 /calendar
 add-booking
 labelAdd booking/label
 controllerbooking/controller
 actionnew/action
 /add-booking
 /pages
 /booking
 /nav

 The problem exists when you're not on a URL that includes both controller
 and action parts. If I go to http://example.com/base/url/admin, it
 defaults to the index action, which is fine, but in the menu above none of
 the actions display, so all of the Booking menus all say just
 http://example.com/base/url/booking. Once you're actually in the menu
 and using links generated by the menu, it all seems to work fine. Has anyone
 got any idea why it is behaving this way?






Re: [fw-general] Zend Navigation ignoring Action section of config

2010-02-21 Thread Cameron
I have two routes, the default and a RESTful router. So because it didn't
really know what route to be on, it.. oh, ok, so it probably WAS doing
the right thing, and returning the correct route (a RESTful one) when the
URL matched that router - it's just a pity that it wasn't adding the http
headers too, eh!

On Mon, Feb 22, 2010 at 2:35 PM, Hector Virgen djvir...@gmail.com wrote:

 No, it defaults the the route that matched the current request. It works
 similarly to the url view helper.

 Do you have any custom routes set up? It seems to me that you may have one
 that looks something like like this:

 /:controller

 It seems like that's the case because normally with only the default
 built-in route your navigation should have worked since all of your pages
 would have used the default route when requested.

 --
 Hector



 On Sun, Feb 21, 2010 at 10:31 PM, Cameron themsel...@gmail.com wrote:

 Ahh ok, thanks, that works. But if there's no route in either the request
 or the config it defaults to... breaking the URLs?

 On Mon, Feb 22, 2010 at 2:24 PM, Hector Virgen djvir...@gmail.comwrote:

 It helps to specify the route because Zend_Navigation uses the current
 route to create the url instead of the default route. So your navigation
 should look more like this:

 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 *routedefault/route*
 /home

 --
 Hector



 On Sun, Feb 21, 2010 at 10:14 PM, Cameron themsel...@gmail.com wrote:

 Hi everyone, I've got an unusual issue with Zend_Navigation that seems
 like it should work correctly, but isn't.

 Here's a basic example of the config...


 nav
 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 /home
 admin
 labelAdmin/label
 controlleradmin/controller
 actionindex/action
 /admin
 booking
 labelBookings/label
 controllerbooking/controller
 actionlist/action

 pages
 list-booking
 labelList bookings/label
 controllerbooking/controller
 actionlist/action
 /list-booking
 calendar
 labelBooking calendar/label
 controllerbooking/controller
 actioncalendar/action
 /calendar
 add-booking
 labelAdd booking/label
 controllerbooking/controller
 actionnew/action
 /add-booking
 /pages
 /booking
 /nav

 The problem exists when you're not on a URL that includes both
 controller and action parts. If I go to
 http://example.com/base/url/admin, it defaults to the index action,
 which is fine, but in the menu above none of the actions display, so all of
 the Booking menus all say just http://example.com/base/url/booking.
 Once you're actually in the menu and using links generated by the menu, 
 it
 all seems to work fine. Has anyone got any idea why it is behaving this 
 way?








Re: [fw-general] Zend Navigation ignoring Action section of config

2010-02-21 Thread Hector Virgen
LOL :) Yea, that'd be interesting if Zend_Navigation was outputting headers!

--
Hector


On Sun, Feb 21, 2010 at 10:48 PM, Cameron themsel...@gmail.com wrote:

 I have two routes, the default and a RESTful router. So because it didn't
 really know what route to be on, it.. oh, ok, so it probably WAS doing
 the right thing, and returning the correct route (a RESTful one) when the
 URL matched that router - it's just a pity that it wasn't adding the http
 headers too, eh!

 On Mon, Feb 22, 2010 at 2:35 PM, Hector Virgen djvir...@gmail.com wrote:

 No, it defaults the the route that matched the current request. It works
 similarly to the url view helper.

 Do you have any custom routes set up? It seems to me that you may have one
 that looks something like like this:

 /:controller

 It seems like that's the case because normally with only the default
 built-in route your navigation should have worked since all of your pages
 would have used the default route when requested.

 --
 Hector



 On Sun, Feb 21, 2010 at 10:31 PM, Cameron themsel...@gmail.com wrote:

 Ahh ok, thanks, that works. But if there's no route in either the request
 or the config it defaults to... breaking the URLs?

 On Mon, Feb 22, 2010 at 2:24 PM, Hector Virgen djvir...@gmail.comwrote:

 It helps to specify the route because Zend_Navigation uses the current
 route to create the url instead of the default route. So your navigation
 should look more like this:

 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 *routedefault/route*
 /home

 --
 Hector



 On Sun, Feb 21, 2010 at 10:14 PM, Cameron themsel...@gmail.com wrote:

 Hi everyone, I've got an unusual issue with Zend_Navigation that seems
 like it should work correctly, but isn't.

 Here's a basic example of the config...


 nav
 home
 labelHome/label
 controllerindex/controller
 actionindex/action
 /home
 admin
 labelAdmin/label
 controlleradmin/controller
 actionindex/action
 /admin
 booking
 labelBookings/label
 controllerbooking/controller
 actionlist/action

 pages
 list-booking
 labelList bookings/label
 controllerbooking/controller
 actionlist/action
 /list-booking
 calendar
 labelBooking calendar/label
 controllerbooking/controller
 actioncalendar/action
 /calendar
 add-booking
 labelAdd booking/label
 controllerbooking/controller
 actionnew/action
 /add-booking
 /pages
 /booking
 /nav

 The problem exists when you're not on a URL that includes both
 controller and action parts. If I go to
 http://example.com/base/url/admin, it defaults to the index action,
 which is fine, but in the menu above none of the actions display, so all 
 of
 the Booking menus all say just http://example.com/base/url/booking.
 Once you're actually in the menu and using links generated by the menu, 
 it
 all seems to work fine. Has anyone got any idea why it is behaving this 
 way?