1

I'm creating a dynamic navigation which content is obtained by URL. To this I've created a ViewHelper in which one I work with my URL and prepare it to create the pages to my navigation.

    foreach($associativeArrayUrl as $key => $value) {
        $page = new MVC(array(
            'label' => $key,
            'route' => 'extranet/'.$key,
            'params' => array('paramid'.$key => $value),
        ));
        array_push($pages, $page);
    }

    $container->addPages($pages);

    foreach ($container as $page) {
        echo '---- ' . $page->label;
        echo '----' . $page->getHref();
    }

$associativeArrayUrl contains the following (for example):

array (size=2)
  'center' => string '10' (length=2)
  'education' => string '15' (length=2)

The problem is when I do the $page->getHref(); It does not show anything. What is the problem and how can I solve it??

Carlos
  • 4,949
  • 2
  • 20
  • 37
Dani Tome
  • 473
  • 1
  • 5
  • 16

0 Answers0