haml, jhaml, and ColdFusion demo
Published on
Proof of Concept:
This is a proof of concept for using haml with ColdFusionAcknowledgements:
I altered code from these two posts and would like to thank them.Required
Input HAML
%html
%head
%title
%g:layoutTitle(default="Adobe ColdFusion")
%link(rel="stylesheet" href="main.css")
%link(rel="shortcut icon" href="favicon.png" type="image/x-icon")
%g:layoutHead/
%g:javascript(library="application")/
%body
#adobe.adobe(style="display:none;")
%img(src="http://www.adobe.com/go/gn_home_logo" alt="Adobe")
#ColdFusionLogo.logo
%a(href="http://www.adobe.com/products/coldfusion/")
%img(src="http://1337productions.com/new_images/ColdFusion_logo.png" alt="ColdFusion" border="0")/
%g:layoutBody/
Output HTML
<html>
<head>
<title>
<g:layoutTitle default='Adobe ColdFusion'></g:layoutTitle>
</title>
<link href='main.css' rel='stylesheet' />
<link href='favicon.png' rel='shortcut icon' type='image/x-icon' />
<g:layoutHead />
<g:javascript library='application' />
</head>
<body>
<div class='adobe' id='adobe' style='display:none;'>
<img alt='Adobe' src='http://www.adobe.com/go/gn_home_logo' />
</div>
<div class='logo' id='ColdFusionLogo'>
<a href='http://www.adobe.com/products/coldfusion/'>
<img alt='ColdFusion' border='0' src='http://1337productions.com/new_images/ColdFusion_logo.png' />
</a>
</div>
<g:layoutBody />
</body>
</html>
Display HTML
Code
```coldfusionAcknowlegements:
I altered code from these two posts and would like to thank them.
- http://blog.atozofweb.com/2010/08/using-less-css-with-coldfusion/
- http://gist.github.com/raw/402590/fa8a70cbe3f2ad5f2d5dad7d017db2167dc658ab/main.haml
<cfset loader = createObject("component", "javaloader.JavaLoader").init(loadPaths, 'true') />
<cfset engine = loader.create("com.cadrlife.jhaml.JHaml").init() />
Input HAML
Title variable is actually %g:layoutTitle(default=" #title_variable# ")#inputhaml#
Output HTML
#xmlformat(text)#