Mike,

Thanks -- the gist seems to be the same. From what im reading if i
want to use sling-initial-content to create a nt:unstructured node
with a file under it, i should be able to define my initial content
as:

/SLING-INF/initial-content/content/mynode.json
/SLING-INF/initial-content/content/mynode/thumbnail.png


This would create a in the JCR

/content<nt:file>/mynode<nt:folder>/thumbnail.png<nt:file>

.. I wonder if i need to set overwriteProperties:=true (overwrite is
already set to true, so i would think that would supercede the
overwriteProperties default of false)

Thanks for the updated link -- if you see any falacies in my
interpretation, please let me know :)




On Thu, Jan 19, 2012 at 9:20 AM, Mike Müller <[email protected]> wrote:
> Hi David
>
> Maybe the link you mentioned is outdated, try this one on the
> sling website:
> http://sling.apache.org/site/content-loading-jcrcontentloader.html
>
> best regards
> mike
>
>> -----Original Message-----
>> From: David G. [mailto:[email protected]]
>> Sent: Wednesday, January 18, 2012 6:25 AM
>> To: [email protected]
>> Subject: Re: Sling-Initial-Content Question
>>
>> FYI - I was following the instructions for "directory" at:
>>
>> http://wiki.apache.org/jackrabbit/ApacheSling/SlingContent
>>
>> I believe what I'm doing should work according to the above link, though the 
>> wording is
>> slightly ambiguous.
>>
>> Thank
>>
>> --
>> David Gonzalez
>> Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>>
>>
>> On Tuesday, January 17, 2012 at 11:11 PM, David G. wrote:
>>
>> > So i have a pretty nice maven build setup going using a variety of maven 
>> > plugins
>> including the maven-bundle-plugin for building my packages. One of the great 
>> features
>> is Sling-Initial-Content which allows me to model nodes via JSON and have 
>> them
>> created upon deployment.
>> >
>> > Im running into a problem where I want to load initial files under certain 
>> > pre-made
>> nodes.
>> >
>> > Example
>> >
>> > /etc/designs/my-site/js/jquery.min.js
>> >
>> > where "my-site" is a node w jcr:primaryType of "cq:Page"
>> >
>> > If I create a my-site.json (which defines a primaryType and place it  
>> > SLING-
>> INF/initial-content/etc/designs/my-site.json, the folder  SLING-INF/initial-
>> content/etc/designs/my-site seems to override the JSON during import and I'm 
>> left
>> with a my-site node with type "sling:Folder"
>> >
>> > Thoughts on how to get around this?
>> >
>> > Thanks
>> >
>> > Below are the relevant plugin configs:
>> >
>> > <Include-Resource>
>> >     {maven-resources},
>> >     src/main/scripts
>> > </Include-Resource>
>> >
>> > <Sling-Bundle-Resources>
>> >     /apps/${project.artifactId},
>> >     /var/classes!/org/apache/jsp/apps/${project.artifactId}
>> > </Sling-Bundle-Resources>
>> >
>> > <Sling-Initial-Content>
>> >     SLING-INF/initial-content/apps/${project.artifactId}/;
>> path:=/apps/${project.artifactId}; overwrite:=true; uninstall:=false,
>> >     SLING-INF/initial-content/etc/designs/${project.artifactId}/;
>> path:=/etc/designs/${project.artifactId}; overwrite:=true; uninstall:=false,
>> >     SLING-INF/initial-content/content/${project.artifactId}/;
>> path:=/content/${project.artifactId}; overwrite:=true; uninstall:=false
>> > </Sling-Initial-Content>
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> >
>> > --
>> > David Gonzalez
>> > Sent with Sparrow (http://www.sparrowmailapp.com/?sig)
>> >
>

Reply via email to