On Dec 16, 2010, at 2:18 PM, Matteo Pelucco wrote: > > On 15.12.2010 19:06, Grégory Joseph wrote: >> >> Hi Will, >> >> Files in there have to match this pattern - similar to regular module >> bootstraps.. >> "/mgnl-bootstrap-samples/" + moduleName + "/" ... xml > > I quickly "fork" at this point the discussion to ask a little question I have > on my "to-ask" question list. > > We know that bootstrap files are automatically loaded at during first time > installation IF they respect the folder structure > > /mgnl-bootstrap-samples/[moduleName]/*.xml > > But what happen if I put subfolders after [moduleName]? > > e.g.: > /mgnl-bootstrap-samples/[moduleName]/extraInstallBoostraps/*.xml > /mgnl-bootstrap-samples/[moduleName]/v2.0/*.xml > /mgnl-bootstrap-samples/[moduleName]/publicInstanceBootstraps/*.xml > > Are they taken into consideration during first time installation? >
Yes they will, so all of these bootstraps in subfolders will be imported too. From the structure you write I think what you want to achieve (different bootstraps on author/public & versions), you have to do by placing them into another folder in src/main/resources, for example: src/main/resources/author-boostrap src/main/resources/public-boostrap (your choice) and then you add in the module's VersionHandler in the extrasInstallTasks a manual defines task for each of these folders. In this task you decide if you're on author or not. I would use for example for this the: ConditionalDelegateTask where you implement the boolean condition(InstallContext installContext) method which checks if you're on author. In a task doing it like this: ServerConfiguration.getInstance().isAdmin() And as the conditional tasks which get executed on the the condition using the BootstrapResourcesTask > Thanks for answering.. > > Matteo Cheers Christian > > > > ---------------------------------------------------------------- > For list details see > http://www.magnolia-cms.com/home/community/mailing-lists.html > To unsubscribe, E-mail to: <[email protected]> > ---------------------------------------------------------------- Best regards, Christian Ringele Magnolia International Ltd. Magnolia® - Simple Open Source Content Management ---------------------------------------------------------------- For list details see http://www.magnolia-cms.com/home/community/mailing-lists.html To unsubscribe, E-mail to: <[email protected]> ----------------------------------------------------------------
