[Koha-devel] what does everyone use to indent/beautify their TMPL files?

Kyle Hall kyle.m.hall at gmail.com
Thu Nov 9 14:41:07 CET 2006


I've been playing with tidy to clean up my template files, but I find that
in files that are missing some tags like <html> and <head> (because they are
included in a seperate file), tidy creates them even though I don't want it
to. Have you experienced that?

Kyle

On 11/8/06, Mason James <mason at katipo.co.nz> wrote:
>
> hiya Everyone,
>
> ive been thinking (for a while) about a way to standardize the way we
> format/indent
>   *.tmpl files in koha
>
> because...
> some of the *.tmpl files i create look awful, and they are just too
> complex for me to work out a consistant way of formatting them.
>
> ive been playing a little with 'tidy' recently
> (http://tidy.sourceforge.net/)
> and ive got 'tidy' to parse and indent a tmpl file without too much
> moaning,
> using a config .rc file like this...
>
> $ cat .tidyrc
> new-blocklevel-tags: tmpl_loop tmpl_if tmpl_else tmpl_unless
> new-inline-tags: tmpl_var tmpl_include
> indent: auto
> indent-spaces: 1
> vertical-space: n
> wrap: 0
>
> then, run tidy like so...
>
> $ tidy -c .tidyrc test.tmpl
>
> --
>
> so, the question is......
>
> - what tools does everyone use for their own *.tmpl
> indenting/formatting/beautifying?
> - are there better ones than 'tidy'?
> - is it a good idea for us to find a tool that formats our tmpl files in a
> standard way?
>
> any ideas folks?
>
> cheers, Mason.
>
> --
> Mason James
> Katipo Communications
> www.katipo.co.nz
> +64 4 934 1285
>
>
> _______________________________________________
> Koha-devel mailing list
> Koha-devel at nongnu.org
> http://lists.nongnu.org/mailman/listinfo/koha-devel
>



-- 
IT Tech
Crawford County Federated Library System
-------------- next part --------------
An HTML attachment was scrubbed...
URL: </pipermail/koha-devel/attachments/20061109/d3c53544/attachment-0002.htm>


More information about the Koha-devel mailing list