Why, when looking for templates associated with a class/table, does
Maypole::View look in a dir named after class's moniker rather than table?
Since default url processing are based on table why are'nt template paths?
Also the docs aren't real specific about the fact that moniker is used.
fom M::Manual::View--
Locating Templates
. . .
. . . This is where the
third directory comes in. The other directory, which May
pole checks very first of all, is specific to the table
that you're viewing. So if you go to
"http://your.shop.com/basket/list", Maypole will look in
the basket directory first for a file called list, and
second in the custom directory for a site-wide list tem
plate, and then fall-back to the factory directory for a
generic list template.
The example in its simplicity is misleading as under default class dbi a table
like "note_card" will have a moniker like "notecard" and thus the directory
"notecard" will be searched.
I'm not sure why moniker was used instead of table name. HOwever moniker is
overrideable so if you decide to change it, you'd need to change names of your
template directories.
To fix this i changed the line in M::View::Base.pm with
$r->model_class->moniker to $r->model_class->table.
thanks
=====
pjs
__________________________________
Do you Yahoo!?
Dress up your holiday email, Hollywood style. Learn more.
http://celebrity.mail.yahoo.com
_______________________________________________
maypole mailing list
maypole at lists.netthink.co.uk
http://lists.netthink.co.uk/listinfo/maypole
This archive was generated by hypermail 2.1.3 : Thu Feb 24 2005 - 22:25:57 GMT