Create template for page type from single page
Permalink
Not sure if this is the correct or best way to do this but...
Currently, I have a page type that is made up of a number of custom blocks. Each custom block uses an API call (to the same place) to fetch data and populate the area with associated data. However, pages made from this page type seem to be taking a long time to load. My thoughts are that one reason this might be is that each block is making a single API call - with lots of blocks on the page there are lots of API calls and so this is holding up the page load.
So, I was thinking that if I created a single page (effectively combining all the blocks into one php file) and used this as a template for a page type, i could then reduce the number of API calls and so speed up page load time.
I can create single pages easily enough. But how do I create a template from the single page that can then be used for page type?
I'm using Fundamental theme if that matters.
Thanks
P
Currently, I have a page type that is made up of a number of custom blocks. Each custom block uses an API call (to the same place) to fetch data and populate the area with associated data. However, pages made from this page type seem to be taking a long time to load. My thoughts are that one reason this might be is that each block is making a single API call - with lots of blocks on the page there are lots of API calls and so this is holding up the page load.
So, I was thinking that if I created a single page (effectively combining all the blocks into one php file) and used this as a template for a page type, i could then reduce the number of API calls and so speed up page load time.
I can create single pages easily enough. But how do I create a template from the single page that can then be used for page type?
I'm using Fundamental theme if that matters.
Thanks
P