I'm new to drupal, and am unsure how to aproach writing a module. My uni is moving to drupal, and I'm working on getting a courses module to display information about courses at the uni.
List of things I need to implement
- A list of courses in a specific subject that can be put in many places on the site, with differnt subjects
- Search page
- I think I understand how to do this one, at least
- List of courses based on search parameters
- List sections in a specifc course and term
I've figured out how to make custom pages and pass data around in the url by follwoing the drupal menu example. From here, I could just custom write everything, and return straight html, and it seems like that would work, but not be the "correct" way to do it in drupal.
The data will be available in an API of sort, I don't know much about it yet. NOrmally I would just make a data class that had sample data in it, and deal with the data later, but it seems like this won't work in drupal.
Should I be aproaching this by trying to get the views module to do the views for my module? It seems like this would be the correct way to do it, but the query is stupidly complex SQL, and the output can't just be a list.
Also, where is a good tutorial on how I should be using content types? It seems like I should be using that effectively as a data class, that somehow gets passed to a view(possibly the views module, maybe just a view I write myself for a page), which renders it, but I haven't been able to figure it out.
Sorry that there is no concrete answer for this, I just really need pointers on how to aprocah drupal modules.