Hi all,

I am working on a project that requires themes much like the popular Content Management System, Drupal. I notice in their "info" files they use with their system to display information about the theme like its title, description, a snapshot of it, etc, my question is, would it be better to store all the themes in a database from the get go? or would it be better to have a file parser that looks in a dir called themes or whatever with a info file per theme?

It would seem to me, that it would be better to have the information located in a database that contains the same info as the info files... but I wanted to get other peoples opinion to see which way is the most efficient/practical.

Thanks.

-DJ

I would use a combination of the two.

You only need to see information about all of the themes when you want to choose the theme to use. If you therefore store the information about each theme within a file, the overhead to parse the files for this information will be limited and contained.

If you then store the information about the current theme in the database, it will be quick to access and display as required. The database would then only need to be updated when the user changes the current theme.

I believe this is how WordPress works. I'm not sure about Drupal however.

R.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.