This tutorial is realized using grails 2.4.2
Tutorial steps are "cristalyzed" in branches. The main branch corresponds to the completed application.
- Add spud dependencies to BuildConfig.groovy
- Link dashboard in main layout adding
<g:link controller="dashboard" namespace="spud_admin">Spud Dashboard</g:link>
in main.gsp - Browse to http://localhost:8080/spud-tutorial/spud/admin
- You will be redirected to the setup wizard where you can define the first cms administrator
- Add the spud manifesf with the template name in main.gsp
<%
//= template_name Simple
%>
- Add the footer snippet reference
<sp:snippet name="Footer" />
in main.gsp - Browse to dashboard and define a footer snippet named "Footer"
- Add the manu reference tag
<sp:menu name="Main " id="navigation"/>
in main.gsp - Browse to dashboard and define a menu named "Main"
- Define home as a cms template in Config.groovy
spud {
cms {
rootPageName = "home"
defaultLayout = "main"
cacheEnabled = false //Turn on action caching
}
}
- Add
<g:pageProperty name="page.body" />
in main.gsp - Add
${page?.name}
in <g:layoutTitle> - Add
//= html body
in main.gsp spud manifest