Drupal being one of the world’s most trusted content management systems, still when it comes to “One Page Site Approach” there aren’t many options for developers to develop a lightweight One Page Site with minimum possible 3 rd party modules.
Some might say it is quite possible using PANELS module but using it causes a lot of issues to manage navigation. Some of the modules which are solely developed to facilitate One Page Site development are,
- Single Page Website (https://www.drupal.org/project/single_page_website)
- Single Page Site (https://www.drupal.org/project/single_page_site)
Both these modules has their own pros and cons, the former has a theme dependency that it can be used along with listed supported themes only, which is not at all acceptable as creating a One Page Site with Drupal default theme won’t suffice client’s design requirements. While the latter has its own story, it is not theme dependent as the former but has few module dependencies like “Menu Attributes” which increases the site overhead but increases the functionality.
Using the second one generates a single page site with required designs but if things were so easy there won’t be a need to write this article, the latter has cons which can be ignored if we are developing a simple one page site. The issues one can face are listed below,
- The module code isn’t in sync with its dependent module.
1) The module is dependent on menu attribute module but changes made in latest versions of menu attribute module isn’t reflected on Single Page Site Module code an instance of the same is that in one of the previous versions of “Menu Attribute” custom title field was named in system as “[‘attributes’][‘name’]” but later in newer versions it was changed to “[‘attributes’][‘title’]” but the single page site module code still has “[‘attributes’][‘name’]” in their code. Due to this the utility of an additional dependent module reduces to a great extent also search of a nonexisting variable value in system may affect the processing speed in the longer run.
2) We can overcome this by a simple edit in code of the module but then these changes will be lost when we update the module.
- The module only allows a single instance of a single page site.
1) Suppose we have a big sitemap and the site design contains multiple instances of single page sites with independent navigations.
- Home (All enlisted in One Page)
- Who We Are
- About (All enlisted in One Page)
- Who We Are
- Our Team
>>> Now in the above mentioned case of Drupal web Development the module will allow Single Page Layout for either 1 or 2 of the above, so if we have the above site map it would be tedious task to develop multiple single page instances on a single site.
>>> In order to overcome this the whole module will have to be revamped to support multiple instances of single page sites on a single drupal installation.
All in all to conclude this post, ONE PAGE Sites even though not so good for SEO and has many other CONs but has its own PROs like it is useful in presenting data such as portfolios and instruction manuals. Hence a simple solution to a very basic requirement is necessary.
How To Use Twig In Drupal 8