활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.
We have a site (domain.com) that lives under /content/namespace/domain_com
I have url mappings that map domain.com to /content/namespace/domain_com
We want links when going to http://www.domain.com to be relative to that node, i.e domain.com/about.html
If I leave Link Checker enabled, it strips out my A tags, for instance my navigation looks like:
<li>About</li>
If I disabled Link Checker, it produces the links exactly as I expect them, for instance the navigation links look like:
<li><a href="https://forums.adobe.com/about.html">About</a></li>
Why is URL mappings breaking links?
해결되었습니다! 솔루션으로 이동.
조회 수
답글
좋아요 수
Hi,
how do your generated links look like? if they are http://domain.com/about.html, the linkchecker will try to resolve them. And if it cannot be resolved, the link is removed. Your links within the site should be relative and should not contain any hostname.
kind regards,
Jrg
조회 수
답글
좋아요 수
Hi,
how do your generated links look like? if they are http://domain.com/about.html, the linkchecker will try to resolve them. And if it cannot be resolved, the link is removed. Your links within the site should be relative and should not contain any hostname.
kind regards,
Jrg
조회 수
답글
좋아요 수
Sounds like you have
If all are configured correctly file a support ticket to validate your settings.
조회 수
답글
좋아요 수
Thanks for the responses.
I assume my mappings are correct. Because when LinkChecker is disabled the links are generated correctly.
My links do not contain the hostname, and they are either generated with the entire JCR structure: /content/namsepace/domain_com/en/about.html (when not using URL mappings) or when using URL mappings that same link is generated like so: /en/about.html (if link checker is disabled).
Here is the code in the component that is generating the nav, it may show a potential problem? (using sightly & server side JS)
use(function () { var items = []; var root = currentPage.getAbsoluteParent(3); var currentNavPath = currentPage.getAbsoluteParent(3).getPath(); var it = root.listChildren(new Packages.com.day.cq.wcm.api.PageFilter()); var children = currentPage.listChildren(); //Used for getting global CTA link var someStyle = currentDesign.getStyle("page_home/site_globals"); var applyUrl = someStyle.get("call_to_action_url", "#"); if (children != null) { children = "dropdown" } else { children = ""; } while (it.hasNext()) { var page = it.next(); // No strict comparison, because the types returned from the Java APIs // don't strictly match the JavaScript types var selected = (page.getPath() == currentNavPath); items.push({ page: page, selected : selected, isDropdown : children }); } return { items: items, applyUrl: applyUrl }; });
I am then just inserting them like so via sightly:
<li class="dropdown"> <a href="${item.page.path}.html" class="dropdown-toggle" data-toggle="dropdown">${item.page.title} <span class="glyphicon glyphicon-triangle-bottom" aria-hidden="true"></span></a> <!--/* Template for children */--> <template data-sly-template.dropdown="${@ childPage}"> <ul class="dropdown-menu" data-sly-list="${childPage.listChildren}"> <li><a href="${item.path}.html">${item.title}</a></li> </ul> </template> <div data-sly-call="${dropdown@childPage=item.page}" data-sly-unwrap></div> </li>
조회 수
답글
좋아요 수
As temporary workaround add [1] into in the <a> tag. Later fix the code to use externalize api.
[1] x-cq-linkchecker="skip"
조회 수
답글
좋아요 수