Version dropdown and languages

Hi everyone. I’ve been looking into making a site a bit like the with a drop down for the version, like the v1.5 / v1.6 one.

But on closer inspection it seems like that is using the language mechanism to provide different versions which seems less than ideal for a few reasons:-

  1. It’d be nice to be able to have multi language support as well as multiple versions on the same site.
  2. There’s a 2 character limit on language names, so once you get to version 1.10 it would stop working I think
  3. If you use [version=1.6] tags, it will only show for that specific version - it would be useful to have content that would appear for all versions 1.6 and above.

Does anyone have any suggestions of a better way to handle multiple versions?

Thanks in advance.

Hi @graf, You might want to take a look at the build-in ‘Taxonomy’ functionality of Grav in combination with the ‘TaxonomyList’ plugin.

You can see both in action in this demo of the TaxonomyList plugin. The taxonomies are shown on the right side below the “Popular Tags” header.

Imagine the tags like ‘Photography’, ‘Journal’ etc. to be your versions ‘v1.5’, ‘v1.10’. When you select a tag/version, you will be taken to a page which only shows pages labeled with that specific tag/version.

Although the ‘TaxonomyList’ plugin shows the tags as a list, you can override the template used by ‘TaxonomyList’ by a dropdown.

Hope this gives you an idea.