-
|
Dear community I have a question about a very special case. My website has 4 sections and 5 different headers. So if you are in the wedding section you have a different menu than in the photography section. I would like the header but in the Sections not swup. It should only swup when you enter another Sections. So only when I go from wedding to photography ect. is swup aktiv. So that then in area Wedding the header does not swup when i go to prices, block etc. ? I have written everything on Astro and use Vidual Studio code, I have created components for the 5 sections. Header-Photography.astro is it possible to write a query where it says is it the same Sections not swup, new Sections swup? https://camposviola.de/ Thanks in advance for your help |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
We've just released swup 4 which supports dynamically setting the containers to replace. If you combine this with the Route Name Plugin, you can define URL groups and create custom logic for visits between certain routes: swup.hooks.on('visit:start', (visit) => {
if (visit.to.route !== visit.from.route) {
visitit.containers = ['#custom'];
}
}); |
Beta Was this translation helpful? Give feedback.
We've just released swup 4 which supports dynamically setting the containers to replace. If you combine this with the Route Name Plugin, you can define URL groups and create custom logic for visits between certain routes: