This is an automated email from the ASF dual-hosted git repository.
jeb pushed a commit to branch SLING-7900
in repository
https://gitbox.apache.org/repos/asf/sling-org-apache-sling-app-cms.git
The following commit(s) were added to refs/heads/SLING-7900 by this push:
new e3e2cd6 AEM-7900 side breadcrumb example working
e3e2cd6 is described below
commit e3e2cd67d890c17ea1eb1709d88cceffe5e3c1d0
Author: JE Bailey <[email protected]>
AuthorDate: Mon Sep 17 13:28:12 2018 -0400
AEM-7900 side breadcrumb example working
---
.../java/org/apache/sling/cms/core/models/components/Breadcrumbs.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git
a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
index 0d2f8fa..71b7075 100644
---
a/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
+++
b/core/src/main/java/org/apache/sling/cms/core/models/components/Breadcrumbs.java
@@ -25,7 +25,6 @@ import javax.inject.Inject;
import org.apache.sling.api.SlingHttpServletRequest;
import org.apache.sling.api.resource.Resource;
import org.apache.sling.api.resource.ValueMap;
-import org.apache.sling.cms.core.models.BaseModel;
import org.apache.sling.models.annotations.Default;
import org.apache.sling.models.annotations.DefaultInjectionStrategy;
import org.apache.sling.models.annotations.Model;
@@ -63,10 +62,11 @@ public class Breadcrumbs {
@PostConstruct
public void postConstruct() {
suffixResource = slingRequest.getRequestPathInfo().getSuffixResource();
+ String prefix = slingRequest.getRequestURI();
+ prefix = prefix.split(suffixResource.getPath())[0];
if (suffixResource == null) {
return;
}
- String prefix = slingRequest.getPathInfo();
boolean first = true;
while (suffixResource.getParent() != null) {
String suffix = suffixResource.getPath();