I have a Maypole app which loads fine, pretty much, but when I try to call list it gives me the following error:
[Maypole::View::TT line 50] TT error for template 'WindowEstimate/list'\nfile error - WindowEstimate/list: not found\nTT paths : /home/crankin/estimator/templates/custom, /home/crankin/estimator/templates/, /home/crankin/estimator/templates/factory\n However my list template is right there in the factory directory. Now if I move list into ~/templates/WindowEstimate/list it works just fine. But I don't want to have to have a list file in every directory because I have 13 or 14 different types of Estimates. I have another maypole application which runs on this same server and I have zero problems with it but it is set up as a regular Maypole application(i.e is uses Defaul Maypoel Model::CDBI). This application uses Maypole::Model::CDBI::Plain because I made this as a standalone Class::DBI app. So basically why cant TT find the templates unless it's in the /templates/WindowEstimate/ directory from the error it says can't find in /custom or /factory, but it's right there with universal read permissions on. Just doesn't make any sense. Secondly my model class inherits from Maypole::Model::CDBI::Plain and loads fine, but my actions aren't working. My model class looks like this. package Estimate::Maypole::Model; use base 'Maypole::Model::CDBI::Plain'; sub step1 :Exported { my ($class, $r) = @_; .... Do some stuff here.... $r->template("newlead"); } 1; And my driver is like this: package Estimate; # The driver file is actually /Estimate/Maypole.pm use Maypole::Application; use Estimate; # This is my offline Class::DBI model equivilent to Offline::Beer BEGIN{ __PACKAGE__->config(Maypole::Config->new()); # I have another Maypole app running. __PACKAGE__->config->model('Estimate::Maypole::Model'); __PACKAGE__->setup([qw/Estimate::WindowEstimate/]); } Estimate->config->{uri_base} = "http://www.myurl.com/estimate/"; Estimate->config->{template_root} = "/home/crankin/estimator/templates/"; Estimate->config->{application_name} = "Estimate"; So everything loads fine. But I can't call my action step1 that resides in Estimate::Maypole::Model. so why not declare it in my driver like : sub Estimate::WindowEstimate::step1 : Exported { ... } or package Estimate::WindowEstimate; sub step1 : Exported {...} well because I have alot of different types of Estimates and I want them all to have a step1 action just like I would want them all to have a list action. the only error I get when running this action is: [Maypole::View::TT line 50] TT error for template 'WindowEstimate/step1'\nfile error - WindowEstimate/step1: not found\nTT paths : /home/crankin/estimator/templates/custom, /home/crankin/estimator/templates/, /home/crankin/estimator/templates/factory\n which I sort of expect because there is no step1 template step1 set's the template to "newlead" via $r->template('newlead'), and if I try to access http://www.myurl.com/estimate/newlead the template pulls up just fine, so I know that is working. So basically how come my actions in my Model class aren't working. Should the call to setup in my driver handle all of that? Thanks for any help, I've scoured maypole.perl.org, and books.simon-cozens.org but can't seemed to find a workable solution. Chris ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2005. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ Maypole-users mailing list Maypole-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/maypole-users