Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Convert Code to a module...


Reply


2 Posts   647 Views

Avatar
timgray

Community Member, 6 Posts

14 May 2010 at 12:34am

I have built a custom page using the tutorial on http://www.ssbits.com/creating-a-simple-contact-form/

I want to change this into a module to be easier to share and integrate with other sites.

anyone have a step by step to take code like that and turn it into a module that SS will use?

I really need to get up to speed on the specifics and designs of modules and I figured this one and a custom bit of code I have for customer photo downloading would be a good start in getting up to speed.

Avatar
3dgoo

Community Member, 133 Posts

14 May 2010 at 1:33pm

Here is a start:
http://doc.silverstripe.org/creating-modules

This also looks alright:
http://doc.silverstripe.org/private:tutorial:creating-a-module?s=private%2520tutorial%2520modules
Especially the To Start part

So if you create a directory structure like they describe in the To Start bit.
Then cut the module files from mysite and themes into your respective module directory.
Then create a _config.php file, and hopefully you'll be sweet.

Good luck, and let us know how you go.