FAQ
Hi,
I need to be able to process a view through a TT template but instead
of subjecting it to the usual chain of processing (pre-process,
wrapper etc) I just want to return it as text to the calling function.
I am basically using TT to process a file GET and will return the text
in a $c->response->body().
Thanks - J

Search Discussions

  • John M. Dlugosz at May 20, 2011 at 7:33 pm

    On 5/20/2011 2:21 PM, jeff robinson jeffreyianrobinson-at-gmail.com |Catalyst/Allow to home| wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    See <http://template-toolkit.org/docs/manual/Intro.html>
  • Jeff robinson at May 20, 2011 at 8:10 pm
    Not quite sure how an intro to TT answers my question, but I did find it here:

    http://search.cpan.org/~abraxxa/Catalyst-View-TT-0.36/lib/Catalyst/View/TT.pm

    Thanks anyway - J
    On Fri, May 20, 2011 at 3:33 PM, John M. Dlugosz wrote:
    On 5/20/2011 2:21 PM, jeff robinson jeffreyianrobinson-at-gmail.com
    Catalyst/Allow to home| wrote:

    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    See <http://template-toolkit.org/docs/manual/Intro.html>



    _______________________________________________
    List: Catalyst@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/
  • John M. Dlugosz at May 20, 2011 at 8:16 pm
    On 5/20/2011 3:10 PM, jeff robinson jeffreyianrobinson-at-gmail.com |Catalyst/Allow to home| wrote:
    Not quite sure how an intro to TT answers my question, but I did find it here:
    Because it shows how to call TT to return a string to the caller.
    http://search.cpan.org/~abraxxa/Catalyst-View-TT-0.36/lib/Catalyst/View/TT.pm

    Thanks anyway - J

    On Fri, May 20, 2011 at 3:33 PM, John M. Dlugoszwrote:
    On 5/20/2011 2:21 PM, jeff robinson jeffreyianrobinson-at-gmail.com
    Catalyst/Allow to home| wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    See<http://template-toolkit.org/docs/manual/Intro.html>



    _______________________________________________
    List: Catalyst@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@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/
  • Alejandro Imass at May 21, 2011 at 6:26 am

    On Fri, May 20, 2011 at 3:21 PM, jeff robinson wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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/
  • Jeff robinson at May 21, 2011 at 4:05 pm
    Alejandro
    I'm mapping a "tradional" website (where page 2 replaces page 1 etc)
    wriitten obviously for Catalyst to one that uses JQuery, ie all of the
    TT for the pages is essentaily in place. The operational model is now,
    however, very different in that a single "master" web page of JQuery
    tabs is loaded when a user enters the site and as a user clicks on the
    various tabs all I need is a file GET of the target pages, ie I'm not
    looking for the page to be replaced as used to be the case. So I need
    to adapt the view to remove some of the prior processing..
    Thanks for the input -- J

    On Sat, May 21, 2011 at 2:26 AM, Alejandro Imass
    wrote:
    On Fri, May 20, 2011 at 3:21 PM, jeff robinson
    wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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@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/
  • Tobias Kremer at May 21, 2011 at 5:56 pm
    You can use a variable (like no_wrap) to control your wrapping. Have a look at this thread:

    http://www.gossamer-threads.com/lists/catalyst/users/9385?do=post_view_threaded#9385

    Hope this helps!
    --Toby

    On 21.05.2011, at 18:05, jeff robinson wrote:

    Alejandro
    I'm mapping a "tradional" website (where page 2 replaces page 1 etc)
    wriitten obviously for Catalyst to one that uses JQuery, ie all of the
    TT for the pages is essentaily in place. The operational model is now,
    however, very different in that a single "master" web page of JQuery
    tabs is loaded when a user enters the site and as a user clicks on the
    various tabs all I need is a file GET of the target pages, ie I'm not
    looking for the page to be replaced as used to be the case. So I need
    to adapt the view to remove some of the prior processing..
    Thanks for the input -- J

    On Sat, May 21, 2011 at 2:26 AM, Alejandro Imass
    wrote:
    On Fri, May 20, 2011 at 3:21 PM, jeff robinson
    wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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@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@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/
  • Jeff robinson at May 21, 2011 at 11:03 pm
    Toby
    That's very handy, thanks for the link - J
    On Sat, May 21, 2011 at 1:56 PM, Tobias Kremer wrote:
    You can use a variable (like no_wrap) to control your wrapping. Have a look at this thread:

    http://www.gossamer-threads.com/lists/catalyst/users/9385?do=post_view_threaded#9385

    Hope this helps!
    --Toby

    On 21.05.2011, at 18:05, jeff robinson wrote:

    Alejandro
    I'm mapping a "tradional" website (where page 2 replaces page 1 etc)
    wriitten obviously for Catalyst to one that uses JQuery, ie all of the
    TT for the pages is essentaily in place. The operational model is now,
    however, very different in that a single "master" web page of JQuery
    tabs is loaded when a user enters the site and as a user clicks on the
    various tabs all I need is a file GET of the target pages, ie I'm not
    looking for the page to be replaced as used to be the case. So I need
    to adapt the view to remove some of the prior processing..
    Thanks for the input -- J

    On Sat, May 21, 2011 at 2:26 AM, Alejandro Imass
    wrote:
    On Fri, May 20, 2011 at 3:21 PM, jeff robinson
    wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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@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@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@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/
  • Alejandro Imass at May 25, 2011 at 10:38 am
    Wow, sounds an awful lot like what we're doing with a little project
    we call EzCat. We tried several CMS including Bricolage, Plone and
    WebGUi and finally threw the towel and decided to use NO CMS and craft
    our little simple thing in Catalyst. We don't pretend it to be
    anything more than a simple framework to make it easy for people to
    code in plain HTML (use their dreamweaver or whatever) and update the
    files via SVN, GIT, etc. But it's all based on existing stuff like
    Catalyst, JQuery, SVN, etc.. instead of re-inventing the wheel with
    our own stuff, so it's just _basically_: Catalyst + JQuery + a bunch
    of macros + Emacs helper (the idea is to have helpers for dreamweaver,
    etc.).

    We plan to make it public when it's a bit more mature but you (or
    anyone here) are welcome to checkout the code and play with it. just
    send me a private e-mail and I'll set-up access to the project. Or, if
    there is sufficient interest we can just open it up right now?

    Best,

    --
    Alejandro Imass

    On Sat, May 21, 2011 at 12:05 PM, jeff robinson
    wrote:
    Alejandro
    I'm mapping a "tradional" website (where page 2 replaces page 1 etc)
    wriitten obviously for Catalyst to one that uses JQuery, ie all of the
    TT for the pages is essentaily in place. The operational model is now,
    however, very different in that a single "master" web page of JQuery
    tabs is loaded when a user enters the site and as a user clicks on the
    various tabs all I need is a file GET of the target pages, ie I'm not
    looking for the page to be replaced as used to be the case. So I need
    to adapt the view to remove some of the prior processing..
    Thanks for the input -- J

    On Sat, May 21, 2011 at 2:26 AM, Alejandro Imass
    wrote:
    On Fri, May 20, 2011 at 3:21 PM, jeff robinson
    wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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@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@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/
  • Jeff robinson at May 26, 2011 at 12:31 pm
    Alejandro,
    Sounds like an ambitious project. We eventually solved the issues we
    were having and the app was as a user GUI to hosted VoIP PBX, where we
    needed to implement some long poll AJAX interfaces to provide for zero
    latency screen updates. In other words its a different sort of app to
    the CMS that you are creating. If you do decide to go public I, and
    I'm sure many others, would like to get the link to your site.
    Best - J

    On Wed, May 25, 2011 at 6:38 AM, Alejandro Imass
    wrote:
    Wow, sounds an awful lot like what we're doing with a little project
    we call EzCat. We tried several CMS including Bricolage, Plone and
    WebGUi and finally threw the towel and decided to use NO CMS and craft
    our little simple thing in Catalyst. We don't pretend it to be
    anything more than a simple framework to make it easy for people to
    code in plain HTML (use their dreamweaver or whatever) and update the
    files via SVN, GIT, etc. But it's all based on existing stuff like
    Catalyst, JQuery, SVN, etc.. instead of re-inventing the wheel with
    our own stuff, so it's just _basically_: ?Catalyst + JQuery + a bunch
    of macros + Emacs helper (the idea is to have helpers for dreamweaver,
    etc.).

    We plan to make it public when it's a bit more mature but you (or
    anyone here) are welcome to checkout the code and play with it. just
    send me a private e-mail and I'll set-up access to the project. Or, if
    there is sufficient interest we can just open it up right now?

    Best,

    --
    Alejandro Imass

    On Sat, May 21, 2011 at 12:05 PM, jeff robinson
    wrote:
    Alejandro
    I'm mapping a "tradional" website (where page 2 replaces page 1 etc)
    wriitten obviously for Catalyst to one that uses JQuery, ie all of the
    TT for the pages is essentaily in place. The operational model is now,
    however, very different in that a single "master" web page of JQuery
    tabs is loaded when a user enters the site and as a user clicks on the
    various tabs all I need is a file GET of the target pages, ie I'm not
    looking for the page to be replaced as used to be the case. So I need
    to adapt the view to remove some of the prior processing..
    Thanks for the input -- J

    On Sat, May 21, 2011 at 2:26 AM, Alejandro Imass
    wrote:
    On Fri, May 20, 2011 at 3:21 PM, jeff robinson
    wrote:
    Hi,
    I need to be able to process a view through a TT template but instead
    of subjecting it to the usual chain of processing (pre-process,
    wrapper etc) I just want to return it as text to the calling function.
    I am basically using TT to process a file GET and will return the text
    in a $c->response->body().
    Thanks - J
    From what you are describing you are probably using TTSite which has a
    pre-configured layout for the TT View

    take a look in:

    root/lib/site/wrapper

    And look at the conditionals there, in fact it's already
    pre-configured so if the extension is txt it will not process the
    headers, etc.

    Hope that helps.

    --
    Alejandro Imass


    _______________________________________________
    List: Catalyst@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@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@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@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/
  • Alejandro Imass at May 26, 2011 at 4:27 pm

    On Thu, May 26, 2011 at 8:31 AM, jeff robinson wrote:
    Alejandro,
    Sounds like an ambitious project. We eventually solved the issues we
    were having and the app was as a user GUI to hosted VoIP PBX, where we
    needed to implement some long poll AJAX interfaces to provide for zero
    latency screen updates. In other words its a different sort of app to
    the CMS that you are creating. ?If you do decide to go public I, and
    I'm sure many others, would like to get the link to your site.
    Best - J
    I see. For your app maybe Jemplate (http://jemplate.net) and the
    corresponding Cat plugin could provide a complement to running the
    V/TT only on the server.

    Regarding EzCat on the contrary, it's just a KISS Cat app to maintain
    simple HTML content, nothing even close to a CMS.
  • Will Trillich at May 26, 2011 at 4:43 pm
    </lurk>

    The only thing I can see at www.jemplate.net is the home page. All the other
    links aren't working for me...? (Chrome on OSX)

    Lovely <title> tag, there, too.


    On Thu, May 26, 2011 at 11:27 AM, Alejandro Imass wrote:

    On Thu, May 26, 2011 at 8:31 AM, jeff robinson
    wrote:
    Alejandro,
    Sounds like an ambitious project. We eventually solved the issues we
    were having and the app was as a user GUI to hosted VoIP PBX, where we
    needed to implement some long poll AJAX interfaces to provide for zero
    latency screen updates. In other words its a different sort of app to
    the CMS that you are creating. If you do decide to go public I, and
    I'm sure many others, would like to get the link to your site.
    Best - J
    I see. For your app maybe Jemplate (http://jemplate.net) and the
    corresponding Cat plugin could provide a complement to running the
    V/TT only on the server.

    Regarding EzCat on the contrary, it's just a KISS Cat app to maintain
    simple HTML content, nothing even close to a CMS.

    _______________________________________________
    List: Catalyst@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/


    --
    11 cheers for binary!
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20110526/69118854/attachment.htm
  • Alejandro Imass at May 26, 2011 at 5:59 pm

    On Thu, May 26, 2011 at 12:43 PM, will trillich wrote:
    </lurk>
    The only thing I can see at www.jemplate.net is the home page. All the other
    links aren't working for me...? (Chrome on OSX)
    Lovely <title> tag, there, too.
    Yeah the Web page is broken but the sofware is awesome. Simply put
    with the Cat plugin:

    1) You write your templates in TT
    2) They will get compiled to JavaScript equivalent
    3) You can run and cache them in the browser.
    4) The Cat plugin supports typical cat caching mechs

    And it's really easy too. Then you can just exchange JSON data with
    your server and render the HTML completely on the browser. Tip:
    JavaScript is cacheable on the browser ;-)

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedMay 20, '11 at 7:21p
activeMay 26, '11 at 5:59p
posts13
users5
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2022 Grokbase