Closed tobybellwood closed 4 years ago
The module works fine, however it only works based on aliased paths, unlike the context module which can support switching by Taxonomies.
I conducted a bit of testing regarding performance of switching between the Bartik and GovCMS theme using Chrome's Network performance monitor averaged over 10 refreshes.
GovCMS loading a basic page | Bartik loading the same basic page |
---|---|
Full render: 1.587s | Full render: 1.44s |
Bartik switched to GovCMS | GovCMS switching to Bartik |
---|---|
Full render: 1.635s | Full render: 1.9s |
So in review the switching adds about .2s to a page load on average.
It is worth mentioning that the Look module has the ability to select Looks (and Themes) according to a number of configurable criteria - URL param, path, session, cookie, field on a node. The Look module has the added advantage of being able to load in a Look (a set of Modifiers) which are able to augment the Theme which is tied to the Look.
At the moment the order of the evaluation of the criteria are hard coded. eg. the URL param will always trump the field on a node. We have been thinking about making this pluggable and sortable to give a lot of flexibility.
As Modifiers will be part of the distro it may be worth considering this module as a way to achieve the selection of Themes.
I've been giving this some thought and believe that it would be better to use a more generic solution which will bring flexibility to the platform. The Switch Page Theme module covers the basics in what appears to be quite a fixed way. In contrast, the Context module, covers the same items in a more flexible way as it uses Condition and ContextReaction plugins to deliver the same functionality.
Conditions
NB: No Domain context is available.
Reactions
Context basically has all of the bases covered out of the box, with the one exception being matching on the domain. This would only be a problem if the site was running in a "domain access" kind of setup where multiple sites were using the same DB - this is unlikely in GovCMS8. If this functionality was needed, a new Condition plugin could be implemented.
Using Context has the following advantages:
In principle it is a good thing to use the plugin system for a distro like GovCMS because it allows functionality to be added in a very clean way.
Looks like this is fixed.
Currently GovCMS offers the Minisite module (port underway to Drupal8) - but this isn't ideal for maintaining the content of a sub-site.
There are a couple of GovCMS7 sites that maintain a different look and feel by path/node using context/taxonomies to switch some of the theme styles.
One suggested module that seems more user-friendly is https://www.drupal.org/project/switch_page_theme - anyone got any experience with this?