Open tm-kn opened 6 years ago
I'm running into a similar requirement, but I am also curious if using that exlcude_variant_pages
is the best approach.
Sorry, I mean this - https://github.com/wagtail/wagtail-personalisation/blob/43b5b62e6021759a77671d36f7432ab10947ebff/src/wagtail_personalisation/utils.py#L101-L113
You can use that function to filter out the QuerySet from the variant pages, just display canonical pages. Variant pages should be not visible to users as separate pages.
@tm-kn yeah I figured that out pretty quickly after I sent the first post. Sorry about that. I edited my original, because I am also curious if that is best practice.
I've been wondering what's the best practice for displaying variant pages that are children of an index page and are displayed on that index page. Currently the best solution in my opinion is to use
utils.exclude_variant_pages
on each queryset I want to display publicly, but it seems a bit tedious to do. Do you have any better ideas or options? Probably worth documenting as well.