Jump to content

Client-side routing (page.js)

Recommended Posts

Hi, everyone!

I'm going to start a new nice site, but the client wanted absolutely a site like one he found surfing the web.
It has a smart navigation system, like an app, so you won't find "jumps" between the pages.

It's super cool and i found it uses page.js as client-side routing, loading the main content with ajax calls.

So, this is my question. Do you think i will find some problem using this script, or maybe i'll find some conflicts with processwire internal routing?
Maybe here there is someone who already used this type of client-side routing with PW?

I'd lile to use PW, with many different page templates...

Share this post

Link to post
Share on other sites

Got to agree with @Pixrael. While page.js seems nice, it's probably overkill in this case, and since you already have ProcessWire to provide routing, it makes sense to just add JavaScript-powered transitions on top of that. I've used http://barbajs.org/ in the past for this purpose.

As a bonus compared to pure JavaScript approach you won't have to worry about search engines, non-JS enabled browsers, etc. as they'll still get the "regular page load experience" :)

  • Like 5

Share this post

Link to post
Share on other sites

I've just recently used barba.js when relaunching the frontend of https://www.priotas.de/ (a processwire based website). As teppo mentioned: That's pretty much what you're looking for.

  • Like 4

Share this post

Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    No registered users viewing this page.

  • Create New...