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.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Convert Code to a module...


Go to End


2 Posts   1077 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, 135 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.