How build single page theme, wchich is build with sections
Created 7 years ago by slavvko

Hi. In last time I try make single page application, but I don't have idea how create single page layout with sections. so maybe you know how do it. Thanks!

stevenweijdt  —  7 years ago

Look into vuejs if you want to do it with javascript https://vuejs.org/

https://router.vuejs.org/en/essentials/getting-started.html

Your pyro app should return JSON which the vuejs app can use. ;-)

What Ryan and Piterden are saying, depends what you want to do exactly. Maybe you can give us more details on what you want exactly.

ryanthompson  —  7 years ago

No reason to use JS if you don't need to. You could loop through child pages and output their content as sections. You could use the Grid FT, etc.. There are a ton of different ways you could do this.

piterden  —  7 years ago

Only if you want to toggle routes inside your one page theme, you'd need to use JavaScript.

piterden  —  7 years ago

But I always thought, that single page application (SPA), implies under itself to have a routing. I mean, exactly different pages inside. URI in browser bar should to be changed sometimes, either it's not SPA, but just page.

ikoniqoz  —  7 years ago

@slavvko - I have built a few single page sites with Pyro 2.2.5 and made full use of the Streams Add-on Module for the sections. Things where Streams Module came on handy were for top section Slider, Testimonials and Gallery. Check out http://calvinhouse.com.au/ This site would be easy to do in PyroCMS 3. with the Streams Module Addon.