This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Description
Hello,
i have integrated two links into a template as follows.
<div class="btn-group" role="group">
<a class="btn btn-default <?php echo ($this->url() == '/education/student-deregistration') ? 'active' : ''; ?>" href="<?php echo $this->url('education.student-deregistration', ['section' => null]); ?>">Vorklinik</a>
<a class="btn btn-default <?php echo ($this->url() == '/education/student-deregistration/clinical') ? 'active' : ''; ?>" href="<?php echo $this->url('education.student-deregistration', ['section' => 'clinical']); ?>">Klinik</a>
</div>
And This is my route.
class RouterDelegatorFactory implements DelegatorFactoryInterface
{
public function __invoke(ContainerInterface $container, $name, callable $callback, array $options = null)
{
$application = $callback();
$application->route('/education/student-deregistration[/{section:clinical|preclinical}]', StudentDeregistrationAction::class, ['GET'], 'education.student-deregistration');
return $application;
}
}
Now I have the following problems:
- With this configuration the link /education/student-deregistration is always output with a / at the end. This is not work. What can i do?
- Is there a more elegant way to check the active link?
@weierophinney @RalfEggert