I would like to find guidance on how to create a very basic Silverstripe module. I would like to start with a module which involves no CMS interface. This will keep things simple and I am hoping that this will allow me to learn how files are invoked into the process when a web page is browsed. I am just looking for something which outlines what must be in place for certain things to happen such as a file being accessed. I am not looking for a detailed explanation.
When I googled "how to" "siverstripe module" the only relevant result I got was a forum where the following was posted on 4th May 2011 with no reply.
How can I make my own Silverstripe module?
I've been looking around for a solution all day. I just can't find a good tutorial on how to make my own Silverstripe module.
The only one I found so far (http://doc.silverstripe.org/old/priv...nt_environment) does not seem to work with the latest version of Silverstripe.
If anyone can help me out, please let me know.
Thanks in advance.
Both the complete guide book by Schommer and the more recent themes book by Krenn explain module creation by adapting a pre-existing complicated module which is of very little help for the purposes of understanding the basic mechanics of what is required.
Ultimately what I would like to do is to incorporate a simple slideshow on the homepage of my site. I would like this module to be lean and mean so I want it stripped down to the bare essentials. I do not appear to be able to do this by adapting an existing module because currently, whenever I attempt to do this, 95% of the code in the module is gibberish to me.
In view of this, I thought I would try to build my own Slideshow module in 3 steps as follows.
1. Make a Helloworld module with no CMS interface with a style sheet.
2. Make a Slideshow module by adding some markup and jQuery.
3. Add a CMS interface.
I am currently stuck on Step 1 because when I browse the page where I have included the Helloworld module, it appears that the php file which contains the controller class and reference to the style sheet is not being accessed. I get this impression because the text is not being styled. Also when I place a PHP exit command (exit;) at the top of the class file, content on the page below the line which includes the module is still being sent to the screen.
I have read through and played around with the code in the Tutorials 1 and 2 in the Silverstripe documentation twice and the penny still has not dropped as to why the class file is not being accessed. This is assuming that my check for access was valid.
Am I missing something obvious?
PS. Something else which would be useful, and which I have not found, are basic tips (not so much what facilities are available but basic things to do) when things don't work. I know that this is something which Silverstripe may not be able to advise on because it is too broad, but perhaps what I have done above to check access to the class file is not valid. I have experience with troubleshooting procedural code but not object code.
PPS. The attached zip file contains a complete copy of the module folder, a themes folder which shows the location and content of the template file which invokes the module (all other files have been stripped out of this folder), and a file which shows the HTML source code sent to the browser.