Creating a theme settings form
Sometimes, you may need to build a generic theme that can be used on different websites, with some minor adjustments. A typical example can be the departments of a university – their websites must be consistent, both in content structure and layout, but they may have some peculiarities. For example, some departments may have a specific Facebook page, whereas others may point to a generic page of the university.
As we saw in Chapter 2, Setting a New Theme and Build Process, every theme has a configuration form where you can set which logo or favicon to use and which page elements to render:
Figure 13.1 – Theme settings for the Alps Trips theme
The settings you can configure with this form (which is located at /admin/appearance/settings/alps_trips
) are very generic and (apart from maybe for the logo and the favicon) not very useful.
In Chapter 5, Styling the Header and the Footer, we left some hardcoded...