• twitter image
  • facebook image
  • youtube image
  • linkedin image
Language: CMS Made Simple Czech CMS Made Simple France CMS Made Simple Spain CMS Made Simple Hungary CMS Made Simple Russia CMS Made Simple Netherlands

All times are UTC




Post new topic Reply to topic  [ 3 posts ] 
Author Message
 Post subject: A template that pulls in sub templates to create a page
PostPosted: Tue Oct 22, 2019 9:01 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Feb 20, 2008 4:33 pm
Posts: 79
Location: London, England
I have been looking for a way to create a page that iterates through sub pages and dynamically pull in these sub pages in order to create a page of sub pages, like a single page website. Each sub page holds a section of the parent page and can be reordered as per the CMSMS re-ordering function.

I remember seeing a post about it some time ago for CMSMS 1.x and there is a similar post here https://www.i-do-this.com/blog/one-page-website-using-menu-manager-templates/57 but, this post only deals with block elements and does not include the sub page template.

Any thoughts or ideas on how to achieve this, or even if you know where I can find the post concerning pulling sub pages into a parent page, including templates.

many thanks

Mark


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: A template that pulls in sub templates to create a page
PostPosted: Tue Oct 22, 2019 9:12 pm 
Online
Dev Team Member
Dev Team Member
User avatar

Joined: Wed Feb 25, 2009 4:25 am
Posts: 847
Location: Victoria, BC
I've done something similar (I think) but I can imagine there would be a lot of different ways to go about it depending upon your requirements, site size, etc.

I used Navigator to make a list of the pages to load:
\$1:
{if isset($nodes)}
  {foreach $nodes as $node}
    <div id="{$node->alias}" class="lazy" data-loader="ajax" data-src="{$node->url}"></div>
  {/foreach}
{/if}


Then I used the jQuery lazy plugin to load each page. It's not exactly the same as what you're doing, but might give you some inspiration. You could also just do straight ajax and specify the </__body> or another element to grab.

_________________
Not getting the answer you need? CMSMS support options


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
 Post subject: Re: A template that pulls in sub templates to create a page
PostPosted: Wed Oct 23, 2019 2:05 pm 
Offline
Forum Members
Forum Members
User avatar

Joined: Wed Feb 20, 2008 4:33 pm
Posts: 79
Location: London, England
I have tried this, the only issue I have is that I really wanted to pre compile the pages with php rather than ajax, this would help SEO and I can cache the pages also.

The i-do-this.com post offered a great solution but only rendered the block elements and not the template a a whole.

your thoughts are appreciated, thanks


Top
  Profile  
 
Share On:
Share on Facebook Share on Twitter Share on Google+
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 3 posts ] 

All times are UTC


Who is online

Users browsing this forum: No registered users


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
A2 Hosting