beacon_live_admin icon indicating copy to clipboard operation
beacon_live_admin copied to clipboard

Page Variants: Add option to render a specific variant via query param

Open APB9785 opened this issue 2 years ago • 0 comments

One idea which came up during the original conversation with Brian around the page variants feature:

If we want to force a page to use a specific variant, we could pass a query param to specify which one.

So for example if a page deployed at mysite.com/blog has a variant named "featured_on_top" then one could force rendering that specific variant by visiting mysite.com/blog?variant=featured_on_top

See https://github.com/BeaconCMS/beacon/blob/cbe3bf7445cc559c96310593105e710366ed2cea/lib/beacon/template.ex#L63-L69

APB9785 avatar Aug 03 '23 19:08 APB9785