Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Fetching contributors…

Cannot retrieve contributors at this time

76 lines (66 sloc) 2.462 kB
<html lift:content_id="main">
<head>
<title>Lift Example</title>
</head>
<body>
<div id="main" class="lift:surround?with=default;at=content">
<style>
/* <![CDATA[ */
p + p {
margin-top: 0em;
text-indent: 0em;
}
.dpp_stuff p {
padding-left: 15px;
}
/* ]]> */
</style>
<p>
Lift keeps the page as an XML data structure throughout
the rendering process. This allows Lift to rewrite the
web page at different rendering phases. After the
rendering is complete, Lift looks for all the
<code>&lt;head/&gt;</code>
tags in the <code>&lt;body&gt;</code> tag. Lift
takes the contents of each <code>&lt;head/&gt;</code>
tag, removes any duplicates and places
the resulting tags in the top level <code>&lt;head/&gt;</code>
tag.
</p>
<p>
So, if you have the following code in your page:
<style type="text/css">
/* <![CDATA[ */
.function-name {
/* font-lock-function-name-face */
color: #0000ff;
}
.string {
/* font-lock-string-face */
color: #bc8f8f;
}
.variable-name {
/* font-lock-variable-name-face */
color: #b8860b;
}
/* ]]> */
</style>
<pre>
&lt;<span class="function-name">span</span>&gt;
&lt;<span class="function-name">head</span>&gt;
&lt;<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/&gt;
&lt;/<span class="function-name">head</span>&gt;
do some jQuery stuff here
&lt;/<span class="function-name">span</span>&gt;
&lt;<span class="function-name">span</span>&gt;
&lt;<span class="function-name">head</span>&gt;
&lt;<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/&gt;
&lt;/<span class="function-name">head</span>&gt;
Do some other jQuery stuff here
&lt;/<span class="function-name">span</span>&gt;
</pre>
Lift will put a single &lt;<span class="function-name">script</span> <span class="variable-name">type</span>=<span class="string">"text/javascript"</span> <span class="variable-name">src</span>=<span class="string">"/classpath/jquery.js"</span>/&gt; into the <code>&lt;head/&gt;</code> of the page.
</p>
</div>
</body>
</html>
Jump to Line
Something went wrong with that request. Please try again.