I am creating a competition website. For the competition I am creating a custom module.

The module has a cp backend where I want to be able to add some details about the competition. For example, opening date and closing date.

I will need the data saved to be accessible via templates to use in conditionals etc. I can do this by creating a function within the module to query and then output this I think.

My question is, should I save this kind of information in the settings column of the exp_modules table, or should this be saved in a custom table for the module itself? I will only need one value for each field, so I feel as if a separate table may be overkill, but I am also unsure if its easy enough to get the settings from the exp_module table.

Thank you.

  • Can I ask why you're not using entries and a "competition" channel with custom fields to match your needs? – Peter Lewis Dec 18 '15 at 18:58
  • Hi Peter. Submissions to the competition will be stored in a 'competition' channel. The data I would like to store above, is config type of data, like opening date/time and closing date/time. I am sure there will be more config type of data I will wish to store too. In channels, there is no way of limiting just one entry. I would prefer not to use entries for this data for that reason. There will be multiple admins that wont have extensive knowledge of EE so its important its easy to set this data once. – ccdavies Dec 18 '15 at 19:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.