mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-10-22 14:05:37 +02:00
Fix: display the correct (menu) icon in the GridFieldDetailForm's breadcrumbs.
In CMSBreadcrumbs.ss the (TopLevel)Controller is not recognized within the Breadcrumbs loop, so the class that is used in css to style the icon cannot be created. Moving the construction outside the loop will remedy this. As far as I can see this works within the CMS.
This commit is contained in:
parent
1432a8e8a1
commit
b1ee36e3aa
@ -1,22 +1,19 @@
|
|||||||
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
|
<div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
|
||||||
<% loop Breadcrumbs %>
|
|
||||||
|
|
||||||
<% if First %>
|
|
||||||
<% if ToplevelController %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% else_if Controller %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% else %>
|
|
||||||
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
|
|
||||||
<% end_if %>
|
|
||||||
<% end_if %>
|
|
||||||
|
|
||||||
|
<% if ToplevelController %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% else_if Controller %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% else %>
|
||||||
|
<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
|
||||||
|
<% end_if %>
|
||||||
|
|
||||||
|
<% loop Breadcrumbs %>
|
||||||
<% if Last %>
|
<% if Last %>
|
||||||
<span class="cms-panel-link crumb last">$Title.XML</span>
|
<span class="cms-panel-link crumb last">$Title.XML</span>
|
||||||
<% else %>
|
<% else %>
|
||||||
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
|
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
|
||||||
<span class="sep">/</span>
|
<span class="sep">/</span>
|
||||||
<% end_if %>
|
<% end_if %>
|
||||||
|
|
||||||
<% end_loop %>
|
<% end_loop %>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user