[Solar-talk] Re: [Solar-svn] Revision 3037 (a.k.a page black-list)
Antti Holvikari
anttih at gmail.com
Sat Mar 22 14:19:28 CDT 2008
On Sat, Mar 22, 2008 at 9:05 PM, Paul M Jones <pmjones at paul-m-jones.com> wrote:
>
> On Mar 22, 2008, at 13:59 , Antti Holvikari wrote:
> > On Sat, Mar 22, 2008 at 8:52 PM, Paul M Jones <pmjones at paul-m-jones.com
> > > wrote:
> >> Hi Antti -- must step out, but quick replies first:
> >>
> >>> 2. I'd very much prefer to have the error handling in a page
> >>> controller than in the front itself. The front now just runs
> >>> _notFound() which prints this simple 404 page. Instead, let the
> >>> front
> >>> run my default page controller and I'll then see what I can do with
> >>> the request. This will most likely run _notFound() in the **page**
> >>> controller, which actually makes perfect sense.
> >>
> >> As it is now, the front-controller *should* send all unrecognized
> >> requests to the default controller. The only time _notFound() is
> >> invoked is if the default controller can't be found. Is it not
> >> behaving this way? I may have messed up the logic moving things
> >> around.
> >
> > Ah, I see it now. My Vendor_App_Base is being chosen by
> > _getPageClass(), this is why it never uses _default ($class is
> > `true`).
> >
> > So, I think the solution is to check the blacklist in _getPageClass().
>
> Well, there's a separate behavior that I just thought of, and that is
> for "disabled" page names to use the default controller and that page-
> name as the action.
I'm not sure what you mean by "separate behaviour". You mean this
could be a solution, or it could behave like this in some situation?
> For example, say your default is "something", and that the "base" name
> is disabled. If a request is for "/base/foo/bar", that would then go
> to "/something/base/foo/bar" and be handled by the "something"
> _notFound(). That is, the default controller will receive all
> "disabled" page names as if they were actions on the default
> controller. (Hope that made sense.)
>
> Does that seem like it might give you what you need?
Yes, this is what I was after. Not 100% sure though if turning
"/base/foo/bar" to "/something/base/foo/bar" would not cause
"inconveniences".
--
Antti Holvikari <http://anttih.com>
More information about the Solar-talk
mailing list