Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

JSON isn't the only way to load initial content. Further informations about content loading can be found in the Content Loading Bundle Documentation.

Create new entry

There is a script that provide this basic function, /apps/david/new.esp. As you can see in David I choose the ESP scripting language, but as we already said, you can choose among a lot of scripting engines with Sling. This script loads two other script files, used in every script of David: /apps/david/header.esp and /apps/david/menu.esp. These scripts, as the name suggests, contain header informations and the menu for David. 

In the header there are jQuery functions and CSS definitions, useful for the whole CMS. In the menu script we can find the definition of a classic menu.

Turning back to the new.esp script, we can see in the following code as header and menu are loaded, using an ESP function.

Code Block

...
...
<title>David Mini CMS</title>
<%
load("header.esp");
%>

</head>
<body onload="checkAuth()">
	<div id="lCenter">
	<div id="desktop">
	<%
	load("menu.esp");
	%>
	<div id="contentPanel" class="centralPanel">
...
...

cs