Hi,
I've been spinning around trying things and nothing gets me what I want.
should get the document 'premiumdoc' into the 'document' variable defined in the template below.
I have a freemarker template
<#include "../include/imports.ftl">
Hello Simple Content page!!
<#if document??>
<h1>${document.title?html}</h1>
<div>
<@hst.html hippohtml=document.content />
</div>
<#else>
<h1>No document found</h1>
</#if>
I have a component defined with this method
@Override
public void doBeforeRender(final HstRequest request, final HstResponse response) throws HstComponentException {
super.doBeforeRender(request, response);
final HstRequestContext ctx = request.getRequestContext();
// Retrieve the document based on the URL
HippoBean document = ctx.getContentBean();
if(document == null) {
try {
log.warn("Cannot find ***** : " + request.toString());
} catch(Exception e) {
log.error("", e);
}
} else {
// Put the document on the request
request.setAttribute("document", document);
}
}
I don't understand how to configure the sitemap.
The documentation talks about the ${1}, etc I have no clue to what in the URL it refers to.
Also there a mention to para names and values for the hst:component again I feel like there is a link between the two that would make my HippoDocument form the HstComponent go magically into the template document variable so at the end I display the content of the document passed 'premiumdoc'.
What am I missing? I seem to be so close and yet I've been stuck the entire day on it.
Any help would be appreciated.
Thx
Johnny