<?php
$isContainer = $this->vars('container') instanceof \Laminas\Navigation\AbstractContainer
    ? 'yes'
    : 'no';
echo $this->variable . PHP_EOL;
$pages = array();
foreach ($this->vars('container') as $page) {
    $pages[] = $page->getLabel();
}
$pages = implode(', ', $pages);
?>
Is a container: <?php echo $isContainer . PHP_EOL; ?>
Pages: <?php echo $pages; ?>
