Skip Menu |

This queue is for tickets about the Catalyst-View-Template-PHP CPAN distribution.

Report information
The Basics
Id: 98814
Status: stalled
Priority: 0/
Queue: Catalyst-View-Template-PHP

People
Owner: Nobody in particular
Requestors: mdwestie [...] gmail.com
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)



Subject: Feature Question
Date: Thu, 11 Sep 2014 20:19:55 -0400
To: <bug-Catalyst-View-Template-PHP [...] rt.cpan.org>
From: "Mark West" <mdwestie [...] gmail.com>
Hello, Are there plans to allow for a "wrapper" attribute as with the standard Template Toolkit Views? I don't see anything in the documentation or the code. Thanks for your work on this module. Mark
Subject: Re: [rt.cpan.org #98814] Feature Question
Date: Fri, 12 Sep 2014 12:02:06 -0700
To: bug-Catalyst-View-Template-PHP [...] rt.cpan.org
From: "Marty O'Brien" <mobrule [...] gmail.com>
Hi Mark, I'm not sure I understand your request. Perhaps you could give an example of what code that used this feature would look like? Or at least a pointer to some Template Toolkit sample code that shows how this wrapper attribute is used? Thanks, Marty O'Brien mob@cpan.org On Thu, Sep 11, 2014 at 5:20 PM, Mark West via RT < bug-Catalyst-View-Template-PHP@rt.cpan.org> wrote: Show quoted text
> Thu Sep 11 20:20:08 2014: Request 98814 was acted upon. > Transaction: Ticket created by mdwestie@gmail.com > Queue: Catalyst-View-Template-PHP > Subject: Feature Question > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mdwestie@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=98814 > > > > Hello, > > Are there plans to allow for a "wrapper" attribute as with the standard > Template Toolkit Views? > > I don't see anything in the documentation or the code. > > Thanks for your work on this module. > > Mark > >
Subject: RE: [rt.cpan.org #98814] Feature Question
Date: Sun, 14 Sep 2014 20:35:19 -0400
To: <bug-Catalyst-View-Template-PHP [...] rt.cpan.org>
From: "Mark West" <mdwestie [...] gmail.com>
Hey Marty: Thanks for the quick response to what may be a dumb request. Here is my configuration information from Catalyst::View::TT. __PACKAGE__->config( TEMPLATE_EXTENSION => '.tt', WRAPPER => ['pagewrap_simple.tt'], INCLUDE_PATH => [ '/vt/apache/htdocs/templates', MGA->path_to( 'templates' ), ], render_die => 1, ); In this case the WRAPPER attribute points to a a TT file that contains HTML code for the header and footer of each page within my site. As I understand it Catalyst processes the template at the beginning of each request. In this case, I have a very simple wrapper file that contains all the HTML for the site's navigation. Perhaps this exceeds the intent for your application. Personally, I like TT better than PHP for styling HTML. Still, I'm interested in using PHP as a templating system as I work with so many designers and coders who work in PHP. Thanks again for your work and your response. Mark Show quoted text
-----Original Message----- From: Marty O'Brien via RT [mailto:bug-Catalyst-View-Template-PHP@rt.cpan.org] Sent: Friday, September 12, 2014 3:02 PM To: mdwestie@gmail.com Subject: Re: [rt.cpan.org #98814] Feature Question <URL: https://rt.cpan.org/Ticket/Display.html?id=98814 > Hi Mark, I'm not sure I understand your request. Perhaps you could give an example of what code that used this feature would look like? Or at least a pointer to some Template Toolkit sample code that shows how this wrapper attribute is used? Thanks, Marty O'Brien mob@cpan.org On Thu, Sep 11, 2014 at 5:20 PM, Mark West via RT < bug-Catalyst-View-Template-PHP@rt.cpan.org> wrote:
> Thu Sep 11 20:20:08 2014: Request 98814 was acted upon. > Transaction: Ticket created by mdwestie@gmail.com > Queue: Catalyst-View-Template-PHP > Subject: Feature Question > Broken in: (no value) > Severity: (no value) > Owner: Nobody > Requestors: mdwestie@gmail.com > Status: new > Ticket <URL: https://rt.cpan.org/Ticket/Display.html?id=98814 > > > > Hello, > > Are there plans to allow for a "wrapper" attribute as with the > standard Template Toolkit Views? > > I don't see anything in the documentation or the code. > > Thanks for your work on this module. > > Mark > >
I haven't found any "wrapper" examples for PHP that require the framework to accept both a template file and the name of another script to generate content. At least not without a lot of contortions that look a lot worse than the problem they were attempting to solve. The more common approaches are laid out here: http://softwareengineering.stackexchange.com/questions/159529/ and in all of those cases the server still has a single entry point to PHP. I wouldn't know what a wrapper would look like for PHP and wouldn't know how to test it.