Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix: display correct icon in the GridFieldDetailForm's breadcrumbs #712

Merged
merged 1 commit into from

2 participants

@Martimiz

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.

@Martimiz Martimiz Fix: display the correct (menu) icon in the GridFieldDetailForm's bre…
…adcrumbs.

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.
b1ee36e
@wilr wilr merged commit 61ea58d into from
@wilr
Collaborator

Looks good. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Aug 8, 2012
  1. @Martimiz

    Fix: display the correct (menu) icon in the GridFieldDetailForm's bre…

    Martimiz authored
    …adcrumbs.
    
    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 page is out of date. Refresh to see the latest.
Showing with 9 additions and 12 deletions.
  1. +9 −12 admin/templates/CMSBreadcrumbs.ss
View
21 admin/templates/CMSBreadcrumbs.ss
@@ -1,22 +1,19 @@
<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 %>
<span class="cms-panel-link crumb last">$Title.XML</span>
<% else %>
<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
<span class="sep">/</span>
<% end_if %>
-
<% end_loop %>
</div>
Something went wrong with that request. Please try again.