I'm trying to figure out loading initial-content from a bundle, but I'm
having a bit of trouble.
First, if I understand correctly, if I change files under my
initial-content directory and then reinstall the bundle, they *don't*
change in the repository, right?
Second, I was playing around with the espblog sample, to see if I
understand things correctly. I added the following file:
espblog/src/main/resources/initial-content/content/espblog/posts/first_post.json
that looks like this:
{
"jcr:primaryType":"nt:unstructured",
"posttext":"I'd like this post to be initial content.",
"title":"First post"
}
And when I deploy this bundle, the post is loaded where I expect:
http://localhost:8080/content/espblog/posts/first_post.html
But, this URL no longer works:
http://gandalf.local:8080/content/espblog/posts.list.html
and I believe that's because 'posts' is not a sling:Folder:
Resource dumped by HtmlRendererServlet
Resource path: /content/espblog/posts
Resource metadata: {sling.resolutionPath=/content/espblog/posts,
sling.resolutionPathInfo=.list.html}
Resource type: sling:Folder
Resource super type: -
Resource properties
jcr:created: java.util.GregorianCalendar...
jcr:primaryType: sling:Folder
So, if that's not the way to load the espblog with some initial blog
posts, what is?
--
J. Aaron Farr
馮傑仁
www.cubiclemuses.com