Dynamic breadcrumb

For programming and general questions on Zend Framework

Dynamic breadcrumb

Postby alla8559 on Mon Jun 05, 2017 12:28 am

I want make dynamic breadcrumb, example:

in url: /category/subcategory/year/month/content.htm

/hero/dc/2016/12/films.html

in my breadcrumb:
Home > DC > 2016 > December > Release films


How i do this?



My route code:
Code: Select all
'content' => [
        'type'    => Segment::class,
        'options' => [
          'route'    => '[/:category[/:subcategory[/:year[/:month[/:content]]]]]',
          'constraints' => [
            'category' => '[a-z]*',
            'subcategory' => '[a-z]*',
            'year' => '[0-9]{4}',
            'month' => '[0-9]{2}',
            'content' => '^[a-zA-Z0-9-]+\.(html)$'
          ],
          'defaults' => [
            'controller' => Controller\IndexController::class,
            'action'     => 'content',
          ],
        ],
      ],

alla8559
 
Posts: 2
Joined: Mon Jun 05, 2017 12:23 am

Return to Zend Framework

Who is online

Users browsing this forum: No registered users and 3 guests