[Catalyst] Changing START_TAG and END_TAG of TT template

龔士捷 Gung Shi Jie ksc91u at gmail.com
Thu Dec 3 17:40:01 GMT 2009


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


More information about the Catalyst mailing list