[Catalyst] Can't get view / template to work ?

Craig Chant craig at homeloanpartnership.com
Wed Oct 31 09:29:57 GMT 2012


Sorry for the missing capital, and yes that's what I ran... also I'm sorry if I miss ready the tutorial, I have Dyspraxia.

Why would you have two ->config statements and not all the setting in one ->config , that makes no sense?

I did provide the output from the server plus debug screen?


-----Original Message-----
From: David Schmidt [mailto:davewood at gmx.at]
Sent: 30 October 2012 23:07
To: The elegant MVC web framework
Subject: Re: [Catalyst] Can't get view / template to work ?

On 31 October 2012 00:00, Tomas Doran <bobtfish at bobtfish.net> wrote:
>
> On 30 Oct 2012, at 16:52, Craig Chant wrote:
>
>> I seem stuck with implementing my first view / template.
>>
>> I have a controller Login.pm
>>
>> I ran the view helper script ‘create view HTML HTML::template’
>>
>
> This can't possibly have worked? You mean create view HTML HTML::Template right?
>
>> As per the tutorial I’ve added the following to the config section of MyApp.pm
>>
>>     TEMPLATE_EXTENSION => '.tp',
>
> This needs to be inside the following block
>
>>     'View::HTML' => {
>>             #Set the location for templates files
>>             INCLUDE_PATH => [
>>                 __PACKAGE__->path_to( 'root', 'src' ),
>>             ],
>>         },

C::M::Tutorial says otherwise

http://search.cpan.org/~zarquon/Catalyst-Manual-5.9004/lib/Catalyst/Manual/Tutorial/03_MoreCatalystBasics.pod#Create_a_Catalyst_View


>>
>> I have created a template in ‘root/src/login’  of login.tp
>>
>> In my controller I have …
>>
>> sub login :Path :Args(0) {
>>     my ( $self, $c) = @_;
>>
>>     $c->stash(template => 'login.tp');
>>
>> }
>>
>> But all I get is…
>>
>
> No idea.
>
>>
>> What am I doing wrong?
>>
>
> Not showing us the full debug output of starting the server and making the request.
>
> Sorry to be harsh - but it's impossible to divine what code your app is running without that output…
>
> Cheers
> t0m
>
>
> _______________________________________________
> List: Catalyst at lists.scsys.co.uk
> Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
> Dev site: http://dev.catalyst.perl.org/

_______________________________________________
List: Catalyst at lists.scsys.co.uk
Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst
Searchable archive: http://www.mail-archive.com/catalyst@lists.scsys.co.uk/
Dev site: http://dev.catalyst.perl.org/
This Email and any attachments contain confidential information and is intended solely for the individual to whom it is addressed. If this Email has been misdirected, please notify the author as soon as possible. If you are not the intended recipient you must not disclose, distribute, copy, print or rely on any of the information contained, and all copies must be deleted immediately. Whilst we take reasonable steps to try to identify any software viruses, any attachments to this e-mail may nevertheless contain viruses, which our anti-virus software has failed to identify. You should therefore carry out your own anti-virus checks before opening any documents. HomeLoan Partnership will not accept any liability for damage caused by computer viruses emanating from any attachment or other document supplied with this e-mail. HomeLoan Partnership reserves the right to monitor and archive all e-mail communications through its network. No representative or employee of HomeLoan Partnership has the authority to enter into any contract on behalf of HomeLoan Partnership by email. HomeLoan Partnership is a trading name of H L Partnership Limited, registered in England and Wales with Registration Number 5011722. Registered office: 26-34 Old Street, London, EC1V 9QQ. H L Partnership Limited is authorised and regulated by the Financial Services Authority.


More information about the Catalyst mailing list