FAQ
Hi all:

I create an app called MyApp, and wish its templates could be edit by DW or
other HTML editors, without displaying [% %] template tags in HTML view.

So I replace [% %] with <? ?> tags, and write these codes in my MyApp.pm

__PACKAGE__->config(
name => 'MyApp',
'View::TT' => {
# any TT configurations items go here
INCLUDE_PATH => [
MyApp->path_to( 'root', 'src' ),
MyApp->path_to( 'root', 'lib' ),
],
TEMPLATE_EXTENSION => '.tt',
CATALYST_VAR => 'c',
TIMER => 1,
START_TAG => '<?',
END_TAG => '?>',
},
#TIMER => 1,
#START_TAG => '<?',
#END_TAG => '?>',
);

But seems START_TAG and END_TAG are not forwarded to TT.pm class.

Is there any other Template class to achieve this?

Thanks in advance.

--
Gung Shi Jie
Department of Computer Science and Information Engineering,
National Chung Cheng University
Republic of Taiwan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091204/58be42fb/attachment.htm

Search Discussions

  • 龔士捷 Gung Shi Jie at Dec 3, 2009 at 5:40 pm
    Hi all:

    I create an app called MyApp, and wish its templates could be edit by
    DW or other HTML editors, without displaying [% %] template tags in
    HTML view.

    So I replace [% %] with <? ?> tags, and write these codes in my MyApp.pm

    __PACKAGE__->config(
    ??????? name???? => 'MyApp',
    ??????? 'View::TT' => {
    ??????????? # any TT configurations items go here
    ??????????? INCLUDE_PATH => [
    ????????????? MyApp->path_to( 'root', 'src' ),
    ????????????? MyApp->path_to( 'root', 'lib' ),
    ??????????? ],
    ??????????? TEMPLATE_EXTENSION => '.tt',
    ??????????? CATALYST_VAR => 'c',
    ??????????? TIMER??????? => 1,
    ??????????? START_TAG => '<?',
    ??????????? END_TAG => '?>',
    ??????? },
    ??????? #TIMER => 1,
    ??????? #START_TAG => '<?',
    ??????? #END_TAG => '?>',
    ??? );

    But seems START_TAG and END_TAG are not forwarded to TT.pm class.

    Is there any other Template class to achieve this?

    Thanks in advance.
    Sorry for that previous html post.

    --
    Gung Shi Jie
    Department of Computer Science and Information Engineering,
    National ?Chung Cheng University
    Republic of Taiwan
  • Ian Sillitoe at Dec 3, 2009 at 7:07 pm
    Just to rule out the obvious - you try this after uncommenting those lines
    from the config options?

    from ...

    #START_TAG => '<?',
    #END_TAG => '?>',
    );

    to ...

    START_TAG => '<?',
    END_TAG => '?>',
    );

    (or perhaps):

    TAG_STYLE => 'php',
    );
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091203/159c0f4d/attachment.htm
  • Ian Sillitoe at Dec 3, 2009 at 8:48 pm
    Just to rule out the obvious - you try this after uncommenting those lines
    from the config options?
    Sorry, ignore that bit.

    Use TAG_STYLE => 'php' or quote those tag strings as suggested in docs:

    START_TAG => quotemeta( '<?' )

    http://search.cpan.org/~abw/Template-Toolkit-2.22/lib/Template/Manual/Config.pod
    -------------- next part --------------
    An HTML attachment was scrubbed...
    URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20091203/568e26cc/attachment.htm
  • 龔士捷 Gung Shi Jie at Dec 4, 2009 at 3:17 am
    Thank you,
    I found in the document that I can also write

    <!--[% TAGS php %]--!>

    at the first line of my template.

    It works.
    On Fri, Dec 4, 2009 at 4:48 AM, Ian Sillitoe wrote:
    Sorry, ignore that bit.

    Use TAG_STYLE => 'php' or quote those tag strings as suggested in docs:

    ? START_TAG => quotemeta( '<?' )

    http://search.cpan.org/~abw/Template-Toolkit-2.22/lib/Template/Manual/Config.pod

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupcatalyst @
categoriescatalyst, perl
postedDec 3, '09 at 5:37p
activeDec 4, '09 at 3:17a
posts5
users2
websitecatalystframework.org
irc#catalyst

People

Translate

site design / logo © 2021 Grokbase