I have extended the normal handlebars renderer to allow a template and a
layout to be used - like node express lets you do.
I return a view with a template and a layout:
ContentService contentService = serviceFactory.getContentService();
Content page = contentService.retrieveWithContainerBySlug(slug);
return new PageView(page, page.getTemplate(), page.getLayout());
In the PageView I log the content each time it is requested and in the
constructor.
public PageView(Content content, String template, String layout)
{
super(template, layout);
this.content = content;
logContent(content);
}
public Content getContent()
{
LOG.info("Calling PageView to get the content:");
logContent(content);
return content;
}
In the template, I have added some extra {{}} to dump the raw content:
<div class="container content-area">
{{content}}
{{content.container}}
<div class="row">
{{#each content.container}}
{{this}}
{{this.model}}
{{> product this }}
{{/each}}
</div>
In my development environment, everything works fine. Running under docker
locally, everything works. Running under docker on Google Compute, I get no
content.
I see the constructor being called with content - but no call is ever
registered from the template to get the content from the PageView. The
remainder of the template and layout renders fine, so I get a page with the
correct header and footer.
Anyone seen something like this before?
Its very strange - Only thing I can think of doing is figuring out how to
attach the debugger through ssh port forwarding all the way from my dev
machine to the docker container running on Google Compute and debug the
live application and try to identify where it does wrong.
Thanks for any pointers or helpful advice.
--
You received this message because you are subscribed to the Google Groups
"dropwizard-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.