swup/swupjs

Choosing animation for all subpages

ParallelUniv3rse opened this issue · 2 comments

Hi,
I'm currently working on a project and decided to go with swup for my page transitions. However I've encountered a major setback - I can't define an animation for multiple subpages.
For example:
Having a homepage and a set of products where each product has it's own page under /product/ I'd like to have an animation definition for homepage>product/* which would get used for all the product pages.

Would you consider adding this sort of regexp feature to the animation definitions?

Hi @ParallelUniv3rse

I am planning to adjust the process of choosing the animation as is stated here and a Regex kind of functionality sounds great. Thanks for reporting!

However, it might take some more time before I get to it.

In a meanwhile, your best option is to add the data-swup-transition attribute to all your links leading to the products pages (more info here).

Implemented in JS-plugin. Swupjs is now deprecated.