I have content inside list.phtml which shows the stock count of each product on the category page. this shows if an Admin is logged in.
The problem I have is that Lesti FPC (Full Page Cache) caches it and then everyone can see it.
I have created a custom block and moved my code into the new PHTML file with block name 'colors' and used this to display it
<?php echo $this->getChildHtml('colors') ?>
Unfortunately as this is inside a foreach loop it shows the stock count as 0.
How can I get the getChildHtml to show the correct value?