Skip to content

Commit

Permalink
Avoid encoded HTML breadcrumbs
Browse files Browse the repository at this point in the history
  • Loading branch information
chillu committed Oct 10, 2013
1 parent c8dc9a9 commit aae6b2b
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
6 changes: 5 additions & 1 deletion code/model/SiteConfig.php
Expand Up @@ -53,7 +53,11 @@ public function populateDefaults()
*/
public function getCMSFields() {

$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
$groupsMap = array();
foreach(Group::get() as $group) {
// Listboxfield values are escaped, use ASCII char instead of »
$groupsMap[$group->ID] = $group->getBreadcrumbs(' > ');
}
asort($groupsMap);

$fields = new FieldList(
Expand Down
6 changes: 5 additions & 1 deletion code/model/SiteTree.php
Expand Up @@ -1978,7 +1978,11 @@ public function getCMSFields() {
* @return FieldList
*/
public function getSettingsFields() {
$groupsMap = Group::get()->map('ID', 'Breadcrumbs')->toArray();
$groupsMap = array();
foreach(Group::get() as $group) {
// Listboxfield values are escaped, use ASCII char instead of »
$groupsMap[$group->ID] = $group->getBreadcrumbs(' > ');
}
asort($groupsMap);

$fields = new FieldList(
Expand Down

0 comments on commit aae6b2b

Please sign in to comment.