Hi Denis,
Add this in your module description:
<module>
<name>abc-template</name>
<displayName>Magnolia ABC Templating</displayName>
<description></description>
<class>com.abc.cms.ABCModule</class>
<versionHandler>com.abc.cms.ABCModuleVersionHandler</versionHandler>
With
public class ABCModuleVersionHandler extends SimpleContentVersionHandler {
public ABCModuleVersionHandler () {
}
protected List getBasicInstallTasks(InstallContext ctx) {
final List installTasks = new ArrayList();
// Import the templates Freemarker into the JCR
installTasks.add(new TemplatesInstallTask("/templating-kit/.*\\.ftl",
true));
// Import the theme files (Images and CSS) into the JCR.
// Do not forget to add the property (themeName) in the module
configuration xml!
installTasks.add(new ThemeInstallTask());
installTasks.add(new InstallJavascriptsTask());
installTasks.addAll(super.getBasicInstallTasks(ctx));
return installTasks;
}
Hoop it is enough,
Benoît
From: [email protected]
[mailto:[email protected]] On Behalf Of Bert Leunis
Sent: jeudi 1 octobre 2009 8:51
To: Magnolia User-List
Subject: RE: [magnolia-user] Custom Magnolia Module
Hi Denis,
Did you create a ModuleVersionHandler? Take a look at
info.magnolia.module.DefaultModuleVersionHandler and its subclasses for an
example. You will need a class extending info.magnolia.module.ModuleLifecycle
too. These classes perform the actual work of bootstrapping the files you set
up.
Check the spelling of your files and folders too, you write 'mgnl-boostrap'
somewhere.
Success, Bert
From: [email protected]
[mailto:[email protected]] On Behalf Of Denis Demichev
Sent: woensdag 30 september 2009 23:48
To: [email protected]
Subject: [magnolia-user] Custom Magnolia Module
Hello there!
I want to ask for a help - spending last 2 days trying to package a primitive
custom module for magnolia 4.1 community edition.
I've read http://documentation.magnolia-cms.com/reference/custom-module.html
and trying to follow this how to:
1. Created following file structure:
META-INF
mgnl-bootstrap
mgnl-bootstrap-samples
mgnl-files
2. Added module descriptor:
<module>
<name>abc-template</name>
<displayName>Magnolia ABC Templating</displayName>
<description></description>
<class>com.abc.cms.ABCModule</class>
<version>1.5</version>
<dependencies>
<dependency>
<name>core</name>
<version>4.1/*</version>
</dependency>
<dependency>
<name>adminInterface</name>
<version>4.1/*</version>
</dependency>
<dependency>
<name>fckEditor</name>
<version>4.1/*</version>
</dependency>
<dependency>
<name>dms</name>
<version>1.4/*</version>
</dependency>
</dependencies>
</module>
3. Exported XML from magnolia and added those files to mgnl-boostrap folder:
config.modules.abc-template.xml
website.customhome.xml
These files contain custom tree branch for abc-template created in magnolia
author tool.
I've tried to import them manually - it works.
4. created dummy com.abc.cms.ABCModule and placed it into module folder
5. Placed *.jsp template files to
mgnl-files\templates\ProofOfConcept\templates\custom.jsp
Now I'm trying to install this custom module to clean Magnolia 4.1 installation.
Here's some problems I've encountered
1. My custom web page is not imported
2. My modules\abc-template is not imported - just have a stub with version
number which was in module descriptor
3. My files in mgnl-files folder are not copied to magnoliaAuthor/templates
So here's a question:
It looks like Magnolia is starting to import everything, and places some
information from descriptor to configuration tree, however due to some
exception or misconfiguration it fails to import actual data.
Does anyone hit this problem ever before? I'd really appreciate any help or a
hint.
Thank you in advance
Regards,
Denis
________________________________________
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------
----------------------------------------------------------------
For list details see
http://www.magnolia-cms.com/home/community/mailing-lists.html
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------