Bug #55873

New MenuImplementation does not give current state to homepage

Added by Rens Admiraal over 1 year ago. Updated about 1 year ago.

Status:Resolved Start date:2014-02-11
Priority:Should have Due date:
Assigned To:Rens Admiraal % Done:

0%

Category:-
Target version:-

Description

For the usecase where the homepage is a shortcut to the parent page (with content on the site root) the new MenuImplementation gives unexpected states:

If on homepage
  • All menu items have a normal state
If on subpage
  • Homepage has state 'active' (as the homepage shortcut points to the siteroot which is in the rootline)
  • The subpage currently in the rootline (for example 'about us') also has active state

I'm now sending a patch that fixes the first situation (and as such giving current state to the homepage if the homepage is opened). The second usecase will have to be done with conditions in the template for now.

Associated revisions

Revision 2be0a4b5
Added by Rens Admiraal over 1 year ago

[BUGFIX] Shortcut to siteroot has no active state

The new menu implementation returns a state normal for
nodes equal to the siteroot. This prevents a menu which
contains a shortcut to the homepage to render an active
state.

A menu could now render an active state on the shortcut
to the homepage by for example using a custom node type
for the homepage and adding the following condition:

<f:if condition="{item.node.nodeType.name}  'My.Package:Homepage'">
<f:then>
<li class="{f:if(condition:'{item.state}\'current\'', then:'active')}">
<neos:link.node node="{item.node}">{item.label}</neos:link.node>
</li>
</f:then>
<f:else>
...
</f:else>
</f:if>

Change-Id: Ia44e2ef7e8ecb3713f38fa2adb5256398792c64d
Related: #55873
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/27541
Reviewed-by: Rens Admiraal
Tested-by: Rens Admiraal
Reviewed-by: Christian Mueller
Tested-by: Christian Mueller
Reviewed-by: Karsten Dambekalns
Tested-by: Karsten Dambekalns

Revision ff7cf76a
Added by Rens Admiraal over 1 year ago

[BUGFIX] Shortcut to siteroot has no active state

The new menu implementation returns a state normal for
nodes equal to the siteroot. This prevents a menu which
contains a shortcut to the homepage to render an active
state.

A menu could now render an active state on the shortcut
to the homepage by for example using a custom node type
for the homepage and adding the following condition:

<f:if condition="{item.node.nodeType.name}  'My.Package:Homepage'">
<f:then>
<li class="{f:if(condition:'{item.state}\'current\'', then:'active')}">
<neos:link.node node="{item.node}">{item.label}</neos:link.node>
</li>
</f:then>
<f:else>
...
</f:else>
</f:if>

Change-Id: Ia44e2ef7e8ecb3713f38fa2adb5256398792c64d
Related: #55873
Releases: master, 1.0
Reviewed-on: https://review.typo3.org/27889
Reviewed-by: Karsten Dambekalns
Reviewed-by: Aske Ertmann
Tested-by: Aske Ertmann

History

#2 Updated by Christian Müller about 1 year ago

  • Status changed from New to Resolved

Also available in: Atom PDF