Skip to content
This repository
Browse code

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.
  • Loading branch information...
commit b1ee36e3aa593884c208d005aac21bd840221908 1 parent 1432a8e
Martimiz authored August 08, 2012

Showing 1 changed file with 9 additions and 12 deletions. Show diff stats Hide diff stats

  1. 21  admin/templates/CMSBreadcrumbs.ss
21  admin/templates/CMSBreadcrumbs.ss
... ...
@@ -1,22 +1,19 @@
1 1
 <div class="breadcrumbs-wrapper" data-pjax-fragment="Breadcrumbs">
2  
-	<% loop Breadcrumbs %>
3  
-	
4  
-		<% if First %>
5  
-			<% if ToplevelController %>
6  
-				<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
7  
-			<% else_if Controller %>
8  
-				<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
9  
-			<% else %>
10  
-				<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
11  
-			<% end_if %>
12  
-		<% end_if %>
13 2
 
  3
+	<% if ToplevelController %>
  4
+		<span class="section-icon icon icon-16 icon-{$ToplevelController.MenuCurrentItem.Code.LowerCase}"></span>
  5
+	<% else_if Controller %>
  6
+		<span class="section-icon icon icon-16 icon-{$Controller.MenuCurrentItem.Code.LowerCase}"></span>
  7
+	<% else %>
  8
+		<span class="section-icon icon icon-16 icon-{$MenuCurrentItem.Code.LowerCase}"></span>
  9
+	<% end_if %>
  10
+
  11
+	<% loop Breadcrumbs %>
14 12
 		<% if Last %>
15 13
 			<span class="cms-panel-link crumb last">$Title.XML</span>
16 14
 		<% else %>
17 15
 			<a class="cms-panel-link crumb" href="$Link">$Title.XML</a>
18 16
 			<span class="sep">/</span>
19 17
 		<% end_if %>
20  
-
21 18
 	<% end_loop %>
22 19
 </div>

0 notes on commit b1ee36e

Please sign in to comment.
Something went wrong with that request. Please try again.