Most CMS sites have a number of settings that you can configure from within the Control Panel. These are typically the Site Name (as it appears on the header), the Site Image (again from the header), and the Footer text. In addition to these three, you will often also see settings to maintain the Theme, as well as a section for "additional header information", which you can use for any extra scripts you want to place in each page and also for things such as analytics scripts. For these items, we will need a way to maintain them and store these settings. Just as with our site content, we have a number of options for storing them, but for our CMS, we'll stick with using the database that we've already created. You should already be familiar with creating a new database table, so I won't go into great detail here. However, for our purpose, you will want to create the table, calling it SiteSettings
, with the following columns/data types defined:
We now have the table created...