-
Notifications
You must be signed in to change notification settings - Fork 1
HAML Configuration
In HAML you have a bunch of options. But you are fine with leaving them as they are. The following are all optional. I list them here with their default values and then explain them.
###HAML.debug###
Configure::write('HAML.debug', false);
When in debug nothing will be really rendered. You see all templates and every line prefixed by their actual line-number. This is messy, but it sometimes helps.
###HAML.contentIndent###
Configure::write('HAML.contentIndent', 4);
This is the indention level for $content_for_layout. This means that the view is rendered 4 tabs away from the document border. This helps the parser to produce clean and well-structured HTML.
###HAML.compressHTML###
Configure::write('HAML.compressHTML', false);
This is experimental because the PHP-tags cause their own whitespacing, etc.. What it does is stripping most of the line-breaks and totally messes up the source. But in exchange you get a very small HTML size and save a few bytes. Call it UMO (ugly-micro-optimization).
###HAML.showCacheTime###
Configure::write('HAML.showCacheTime', false);
This is handy and will print the last-modified timestamp into the source using a HTML comment.
###HAML.noCache###
Configure::write('HAML.noCache', false);
Avoid caching and always re-render the templates on reload. This is useful when hacking the parser (i.o.w: for me)