Steps to enable Scf for an existing site

Release 1.1 - ...
  • Install 1.1, including the database update.
  • Add the Scf macro.
  • Add references to the aggregrated includes.

Javascript Includes

The reference to the classbehavior.js can be removed. This functionality is now integrated into Scf. If you check the option 'Add to global Include' for Javascript item JS_MAIN, it can also be removed

Remove these includes:

Smartsite SXML CopyCode image Copy Code
<se:placeholder.addjavascriptinclude url="/assets/behavior/classbehavior.js" />
<se:placeholder.addjavascriptinclude url="JS_MAIN" />

Instead, add the Scf Macro immediately behind the Javascript placeholder. Also, add an include for the aggregated Javascript include with code MERGE_JS_ITEMS.

In the EmptySix site, the ELBA element named Javascript will look like this.

Smartsite SXML CopyCode image Copy Code
<se:placeholder.javascriptinclude />
<se:placeholder.javascriptonload />
<se:placeholder.javascript />
<se:scf />
<se:placeholder.addjavascriptinclude url="MERGE_JS_ITEMS" />

CSS Includes

In the EmptySix site, the option  'Add to global Include' can be checked for these two CSS includes. They can then be removed from the CSS ELBA element.

Smartsite SXML CopyCode image Copy Code
<se:placeholder.addcssinclude url="CSS_LAYOUT" media="screen" />
<se:placeholder.addcssinclude url="CSS_CONTENT" media="screen" />

Instead of these includes, Add a reference to the aggregated CSS include with code MERGE_CSS_ITEMS. The CSS item should look like this:

Smartsite SXML CopyCode image Copy Code
<se:placeholder.cssinclude />
  <se:placeholder.css />
    <se:if expression="!url.commands.exists(request.location(), 'pdf')" whitespace="remove">
  <se:then>
    <se:placeholder.addcssinclude url="MERGE_CSS_ITEMS" media="screen" />
    <se:placeholder.addcssinclude url="CSS_PRINT" media="print" />
  </se:then>
  <se:else>
    <se:placeholder.addcssinclude url="CSS_PRINT" media="screen" />
  </se:else>
</se:if>

Rich Application Page

The contenttype Rich Application Page (RIA) is a simple contenttype that uses a simple xhtml render template. In the rendertemplate for this contenttype, add the Scf Macro immediately after the placeholder declarations.

Smartsite SXML CopyCode image Copy Code
<se:xhtmlpage doctype="xhtml10strict" xmlns:se="http://smartsite.nl/namespaces/sxml/1.0">
{smartletconfig(whitespace=remove)}
<se:placeholder.directives />
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>{itemdata.field(title)}</title>
<se:placeholder.headsection />
<se:placeholder.cssinclude />
<se:placeholder.css />
<se:placeholder.javascriptinclude />
<se:placeholder.javascriptonload />
<se:placeholder.javascript />
<se:scf />
</head>
<body>
<se:itemdata />
</body>
</html>
</se:xhtmlpage>

Note that this contenttype has no external dependencies and should not include a reference to the global includes.

Remove onload from Body

Scf automatically triggers the onload handling declared in javascriptonload placeholder. Therefore you must remove the onload attribute from the Body Element. The tag <body onload="onLoad()"> must be replaced by <body>.

In EmptySix, you can update the BaseLayout system translation and the rendertemplate for Rich Application Page (see above).

Smartsite SXML CopyCode image Copy Code
{init()}
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
  ...
</head>
<body>
  ...
</body>
</html>

Smartlet.config

The translation Smartlet.Config contains the global defaults for contenttype Smartlet. Add this translation to all rendertemplates that are used to render smartlets.

In the EmptySix site, you can add this translation to the ELBA element named init.

Smartsite SXML CopyCode image Copy Code
<se:placeholder.directives /><se:placeholder id="userinfo" render="false"/>{smartletconfig()}

You should also add the translation in the rendertemplate for contenttype Rich Application Page (see above).

Remove old behavior logic

Smartsite iXperion 1.0 included some behavior features. The login form together with Change Password, included in EmptySix, made use of this behavior.

The behavior implementation has been superseded by the behavior features, included in the Smartsite Client Framework. If you update the Change Password item, you can remove the call to {behavior.load()} that might be present in system translation baselayout().