#Help me. I need Router System but without reload

23 messages ยท Page 1 of 1 (latest)

rugged pivot
#

but swupjs didn't work very well on nasted router either

jovial fog
rugged pivot
#

But when I go from one page to another on the clientrouter, the router does not change. When I refresh the page, it also appears

jovial fog
#

What do you mean the "router" doesn't change? and "it" also appears?

rugged pivot
#

I am using swupjs. But I couldn't make a nasted layout with swupjs.

jovial fog
#

Is your project set to output: server?

#

Also looking at their demo video you could achieve most of that behavior with the ClientRouter and remove the extra dependency if you wanted

rugged pivot
#

Yeah. my config output:server

jovial fog
#

Is there a repo I could look at?

rugged pivot
#

Sure

#

If you fix my problem. I will very happy

jovial fog
#

And what exactly is not working for you? Seems to work fine for me locally based on my knowledge of Swup and what should be happening visually

rugged pivot
#

dashboard

#

this.

jovial fog
rugged pivot
#

That's where siderbar should not change.
Only content should be changed

jovial fog
#

Got it ๐Ÿ‘

#

I'm not too sure how to get the behavior you want since I've never used swup, however after playing around and looking at the docs I think I have an idea

It looks like the Swup() constructor takes an options object and one of those options is containers

this takes an array of container ID's so obviously you would want #swup in there, but I think maybe you can add a second one to use for targeting that dashboard aside

So something like containers: ["#swup, "#no-animations"] and then use that second container for targeting with swup to disable the transitions

Let me know if that helps at all

rugged pivot
#

Did I work for you?

jovial fog
#

I didn't try it as I've never used swup and their docs were a little sparse on how to actually use the containers to disable animations for part of a page (they specifically mention doing this under the API reference but there is no example or link to further explanation) here is the specific section if you are curious

Since you've been actively using it I was hoping you might have a better idea how to do that ๐Ÿ˜…

rugged pivot
#

Will it be a problem for SEO if I use ClientRouter?