Skip to content

[RFC] UrlComparerTrait::normalize including action parameters? #110

@raul338

Description

@raul338

I have a navbar with 4 links, 3 of them are links to the Pages Controller (to display different pages)
Up to the 3.1.0 launch the url detection worked well, after the update all PagesController link are marked as visited.
Example (simplified w/o icons)

echo $this->Navbar->beginMenu();
echo $this->Navbar->link(__('Home'), [
    'controller' => 'Pages',
    'action' => 'display', 'home'
]);
echo $this->Navbar->link(__('Apartments'), [
    'controller' => 'Apartments',
    'action' => 'index'
]);
echo $this->Navbar->link(__('FAQ'), [
    'controller' => 'Pages',
    'action' => 'display', 'faq'
]);
echo $this->Navbar->link(__('General Conditions'), [
    'controller' => 'Pages',
    'action' => 'display', 'general-conditions'
]);
echo $this->Navbar->endMenu();

screenshot_20170218_010538

I can submit a PR to fix this, but some tests breaks, some are obvious, some others not like

1) Bootstrap\Test\TestCase\View\Helper\UrlComparerTraitTest::testFullBase
/cakephp/cakephp/admin/users/edit/1 != /cakephp/admin/users/edit
Failed asserting that false is true.

I think it should pass, but then I think how useful is a very specific link in a navbar...

Should I submit the PR? I would like have some consensus about it.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions