Page 1 of 1

Multiple pages shown as one single long page

Posted: Tue Mar 30, 2021 9:45 am
by caigner
How can I produce a layout like on the following web page in CMSMS?

https://library.elementor.com/landing-page-wedding/

Obviously multiple pages are shown right after each other by scrolling down.

How can multiple content pages be added together to form one single scrolling page?

Re: Multiple pages shown as one single long page

Posted: Tue Mar 30, 2021 10:43 am
by Rolf

Re: Multiple pages shown as one single long page

Posted: Tue Mar 30, 2021 2:30 pm
by DIGI3
I use Navigator to build the page divs and anchors, then jQuery to populate and, optionally, lazy load them:

Navigator template for building the divs:

Code: Select all

{if isset($nodes)}
  {foreach $nodes as $node}
    <span id="anchor-{$node->alias}" class="anchor"></span>
    <div id="{$node->alias}">
      {* content will be loaded here by jQuery *}
    </div>
  {/foreach}
{/if}
Then another one for building the script:

Code: Select all

{if isset($nodes)}
  {foreach $nodes as $node}
    $( "#{$node->alias}" ).load( "{$node->url}" );
  {/foreach}
{/if}
Call the first one with a Navigator tag excluding the current page, and loadprops=0, where the content should go, and the second one the same way in <__script__> tags after jQuery is loaded. The content pages should either have a blank template that just contains {content} and any layout html needed, or you'll need to add ?showtemplate=false to the url called with .load()

You can then get fancier by adding lazy loading, navigation links, etc. The Eat (free) and Eat Pro themes on easythemes.ca use the above, the paid version having lazy load.

Re: Multiple pages shown as one single long page

Posted: Thu Apr 08, 2021 6:13 pm
by caigner
Thanks for your answers. Seems to be heavy stuff. At least a lot of what I read sounds quite alien to me. I will give it a try. Let's see how far I get.