Issue with xml transformation

lawrence whittemore asked on November 18, 2020 22:38

<li {% IsCurrentDocument()?"class='current-page selected'":"" %}> 
<div class="row align-items-center">
  <a class="page-link-item col-10" href="{% GetDocumentUrl() %}">{% DocumentName %}</a>
  <button id="{% NodeID %}" class="submenu-icon"><span class="fas fa-chevron-down"></span></button>
</div>
{^SubLevelPlaceHolder^} 

We're having a weird issue with the {%GetDocumentUrl()%} macro. If you look at the right hand menu on this page https://northernlighthealth.org/Locations/Eastern-Maine-Medical-Center/Care-Centers-Services/Surgery/Heartburn-Program the links all work however on this page https://northernlighthealth.org/EMMCHernia which uses a page alias the menu breaks and all the links in it point to the page alias for the page we are on and not the actual urls for the pages in the transformation

Recent Answers


Juraj Ondrus answered on November 19, 2020 09:20

I would say the issue is in the configuration of the listing web part you are using. Are those pages using the same page template - which would mean the web part setup is the same, or not?
My idea/guess is, that the listing web part is missing e.g. the NodeAlias and/or NodeAliasPath column listed in the Columns setting. So, this information about the listed item is missing and thus, current page's node alias is used.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on November 19, 2020 14:02

they use the same page template. The only difference for the page the control breaks on, is that it has the "path or pattern" set in the url options.

0 votesVote for this answer Mark as a Correct answer

lawrence whittemore answered on November 19, 2020 14:06

simple fix was to change it from {%getdocumenturl()%} to {%nodealiaspath%}. we'll see how that works until someone else finds that it breaks something :)

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.