| Smartsite SXML |
|
|---|---|
<se:xhtmlpage doctype="xhtml10strict" xmlns:se="http://smartsite.nl/namespaces/sxml/1.0">
<se:placeholder.directives />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{string.removetags(itemdata.rawfield(title))}</title>
<se:placeholder id="headsection" rowformat="{this.field(1)}{char.crlf()}"/>
<se:placeholder.cssinclude />
<se:placeholder.css />
<se:placeholder.javascriptinclude />
<se:placeholder.javascriptonload />
<se:placeholder.javascript />
<se:scf startupmode="bodyscript" jquerynoconflict="false">
<se:collection>
<se:member name="itemNumber" value="{itemdata.number()}" />
</se:collection>
</se:scf>
</head>
<body>
<div>
This example shows a few things:
<ul>
<li>
Use of the Scf mode parameter: bodyscript.<br />
makes Scf start up just a little bit earlier than with 'documentready'.
Sometimes, this will make the difference when it comes to the user experience.
</li>
<li>
Use of the Scf jqueryNoconflict parameter.<br />
Makes jQuery available as '$'.<br />
Use this if no conflicting library such as Prototype is also referenced.
</li>
<li>
Use of the settings collection for Scf.<br />
In this case, the current item number is made available to Scf scripts as:
<pre>$.scf.settings.itemNumber</pre>
</li>
</ul>
</div>
<se:placeholder.addjavascriptonload>
alert($.scf.settings.itemNumber);
</se:placeholder.addjavascriptonload>
</body>
</html>
</se:xhtmlpage>
|
|
| Example Result |
|
|---|---|
<?xml version="1.0" encoding="utf-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><base href="http://test6/"/>
<title>Scf example</title>
<link rel="stylesheet" type="text/css" href="/Default_Channel/Configuration/ScfStyles.css" />
<script type="text/javascript" src="/scf/jquery/jquery.js"></script>
<script type="text/javascript" src="/scf/jquery/jquery.scf.js"></script>
<script type="text/javascript" src="/Default_Channel/Configuration/ScfScripts.js"></script>
<script type="text/javascript">
/*<![CDATA[*/
function onLoad() {
alert($.scf.settings.itemNumber);
}
/*]]>*/
</script>
</head>
<body>
<div>
This example shows a few things:
<ul>
<li>
Use of the Scf mode parameter: bodyscript.<br />
makes Scf start up just a little bit earlier than with 'documentready'.
Sometimes, this will make the difference when it comes to the user experience.
</li>
<li>
Use of the Scf jqueryNoconflict parameter.<br />
Makes jQuery available as '$'.<br />
Use this if no conflicting library such as Prototype is also referenced.
</li>
<li>
Use of the settings collection for Scf.<br />
In this case, the current item number is made available to Scf scripts as:
<pre>$.scf.settings.itemNumber</pre>
</li>
</ul>
</div>
<script type="text/javascript">$j.scf.start({"locale":1043,"conflict":false,"itemNumber":6494});onLoad()</script></body>
</html>
|
|