Skip to content

Landing page: Customizable content boxes #1815

@osma

Description

@osma

Skosmos 2 included a mechanism to customize the landing page by adding/editing Twig templates called left.inc and right.inc (as well as footer.inc that applied to all pages). These files, if they existed, were simply included into the HTML structure.

For Skosmos 3, we need something similar, but ideally a bit more flexible. For the landing page specifically, the Skosmos 3.0 Architecture document shows a structural diagram, drawn in the early days of Skosmos 3 development, with boxes called landing-top-slot, landing-start-slot, landing-end-slot and landing-bottom-slot. IIRC the idea was that these boxes could be populated with additional content defined by the administrator.

The task is to define these boxes in our DOM structure and to set up a mechanism for including content into them from customizable template files.

In our current landing.twig template, we have some placeholder content ("Welcome to the Skosmos browser demo", "Skosmos is open source and on GitHub") in two boxes in the right sidebar on the landing page. These should be removed from the landing.twig template and replaced with customizable content in separate files.

Proposed implementation

  1. Create a new top level directory slots with subdirectories landing-top, landing-start, landing-end, landing-bottom
  2. Add DOM elements (DIVs most likely) with IDs landing-top-slot, landing-start-slot, landing-end-slot and landing-bottom-slot to the Twig templates
  3. Populate the above mentioned DIVs by including any Twig template files from slots/*/*.twig, in alphabetical order
  4. Move the current placeholder content boxes into separate files slots/landing-end/0-welcome.twig and slots/landing-end/1-skosmos-github.twig

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

Status

Issue/PR closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions