Hi,

Rory Douglas schrieb:
> Aaah, missed that.  Cool.
> Only thing that comes to mind though - what about registering scripts
> for sling/servlet/default or sling/servlet/errorhandler in different
> bundles?

You mean two bundles define scripts for sling/servlet/default ?

How about this:

Bundle1: Script is in src/main/resources/content/this.jsp
     <Sling-Initial-Content>
         /content/this.jsp;overwrite:=true;path=/sling/servlet/default
     </Sling-Initial-Content>

Bundle2: Script is in src/main/resources/content/that.jsp
     <Sling-Initial-Content>
         /content/that.jsp;overwrite:=true;path=/sling/servlet/default
     </Sling-Initial-Content>

Regards
Felix

> 
> Felix Meschberger wrote:
>> Hi,
>>
>> Rory Douglas schrieb:
>>  
>>> I was wondering about this too.
>>>
>>> I think the issue is that the overwrite appears to happen from the top
>>> level directory (e.g. /apps), and content is literally replaced with
>>>     
>>
>> Actually, by default the content is added from the root (/) unless the
>> path parameter is used as in :
>>
>>     <Sling-Initial-Content>
>>         /content;overwrite:=true;path=/some/lower/level
>>     </Sling-Initial-Content>
>>
>> Regards
>> Felix
>>
>>  
>>> exactly what is in the overwriting bundle.  So in even if you separate
>>> out /apps/foo and /apps/foo/gui/css into different bundles, depending on
>>> the order of install, you'll only have one of the directory structures
>>> present at the end.  I stopped using ;overwrite:=true for this
>>> reason. I verified this now by adding the overwrite option to the
>>> espblog sample
>>> & all my custom scripts disappeared from apps (can someone else confirm
>>> this behavior?)
>>>
>>> This may be desirable behavior in some situations, but many applications
>>> & modules are going to install content starting at /apps, so perhaps
>>> there should be a third option like 'update:=true', that does only an
>>> additive overwrite?
>>>
>>> Regards,
>>> Rory
>>>
>>> Felix Meschberger wrote:
>>>    
>>>> Hi Andreas,
>>>>
>>>> Andreas Hartmann schrieb:
>>>>  
>>>>      
>>>>> is it possible to load overlapping initial content from multiple
>>>>> bundles
>>>>> when overwriting is enabled? E.g. if I have the following bundles with
>>>>> content:
>>>>>             
>>>> IIRC the initial content tree should be disjoint for different bundles
>>>> if overwrite is set.
>>>>
>>>>  
>>>>      
>>>>>   bundle "core": content/apps/foo/index.html
>>>>>   bundle "gui":  content/apps/foo/gui/css/foo.css
>>>>>
>>>>> When I install either of these bundles, the content of the other
>>>>> module
>>>>> is removed. Is there any way around this, or do I have to disable
>>>>> overwriting?
>>>>>             
>>>> So maybe in your core bundle you should just provide
>>>> content/apps/foo/index.html while in the gui bundle you should provide
>>>> contetn/apps/foo/gui.
>>>>
>>>> Hope this helps.
>>>>
>>>> Regards
>>>> Felix
>>>>         
> 

Reply via email to