Loading subpages via Pagelist

Permalink
Hi all
I've been working with c5 for a half a year now and overall I'm very pleased everything is working great :)

I have a question for which approach is the best one, regarding usage of minimum resources but still getting best possible result.

I figured out that there are diffrent ways to load content from a subpage into a pagelist block for a Onepage.

1. So in my opinion the easiest way is to create attributes for the most types of content and retrieve them in the pagelist template with
$c->getAttribute('myAttributeHandle')

and this is always flawlessly.
But this isn't quite the problem.

It starts when you want to load the content which has been placed directly on the subpage.
As an example imagine on the subpage there is custom developed block.

In the beginning I was working with
file_get_contents($link . '?content')

which works absolutely fine, but it loads a lot of things you dont need (as a header/footer etc)

then i figured out there are better options like using something like
$blockMain = $page->getBlocks('Main');
$has_content_main = count($blockMain);
if($has_content_main):             
$SubPageContent = new Area('SubPageContent');
$SubPageContent->setAreaGridMaximumColumns(12);
$SubPageContent->display($c, $blockMain);
endif;


or really simularly loading the whole area instead of retrieving the blocks inside it.
These two approaches work great and you only get the elements you actually wanted to.

Of course the content can be fetched with ajax too if its necessairy.

Anyway, I'd like to know if there are more approaches which make sence or are even better, faster and safer.

so hit me up in the comment section and let me know :)
Thanks :))