Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Nik Wahlberg 639 posts 1237 karma points MVP
    Oct 02, 2013 @ 14:45
    Nik Wahlberg
    0

    Recursive in 6.1.5 not working?

    Hi all, I'm not sure if I'm going nuts, but for some reason the ancestor-or-self axes seems to be working sporadically in 6.1.5?

    $currentPage/ancestor-or-self::*/nameOfProperty

    It appears that properties that use URL Picker and MNTP are working, but others do not (like RTE and Textstring)?

    Anyone else seen this?

    Thanks, Nik

  • Mads Jørgensen 74 posts 226 karma points
    Oct 02, 2013 @ 14:48
    Mads Jørgensen
    0

    Hmmm, well it ought to. I really haven't experienced any issues in that direction!

    Could you describe a bit more?

  • Chriztian Steinmeier 2720 posts 8225 karma points MVP 4x admin c-trib
    Oct 02, 2013 @ 14:53
    Chriztian Steinmeier
    0

    Hi Nik,

    Be sure to pick the one that actually contains something, e.g.:

    $currentPage/ancestor-or-self::*[normalize-space(propertyName)][1]/propertyName
    

    - otherwise you'll get the value of the topmost, which may be empty...

    /Chriztian

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Oct 02, 2013 @ 14:57
    Nik Wahlberg
    0

    Hi Chriztian, nice thought. But, the top most node (homepage node) is the one that has all of the values. The values display fine when viewing that page, but if I go one level down in the tree, the values are empty (with exception of the two types mentioned above). Just tried applying your suggestion and didn't work...

    Thanks for any/all suggestions.

  • Chriztian Steinmeier 2720 posts 8225 karma points MVP 4x admin c-trib
    Oct 02, 2013 @ 15:07
    Chriztian Steinmeier
    0

    Okay - that sounds very weird - in any case, this is all handled by the MSXML parser/processor, so the problem lies with the XML data or the XSLT - or something with the way Umbraco hands over the $currentPage value...

    Could we see a little more XSLT and perhaps a tiny chunk of the XML ?

    /Chriztian

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Oct 02, 2013 @ 15:15
    Nik Wahlberg
    0

    Hi, yes for sure. In the example below, the twitterLink and linkedInLink properties are working on the products page, but nothing else from this contact XSLT. Thanks again!

    XSLT (one of many)

    <xsl:value-of select="$currentPage/ancestor-or-self::*/contactText" disable-output-escaping="yes"/>
    
    <div class="phone">
      <p>
        <xsl:value-of select="$currentPage/ancestor-or-self::*/contactPhoneLabel"/>
      </p>
    
      <a href="tel:{$currentPage/ancestor-or-self::*/contactPhone}">
        <xsl:value-of select="$currentPage/ancestor-or-self::*/contactPhone"/>
      </a>
    </div>
    <div class="social">
      <a class="soc-btn in" href="{$currentPage/ancestor-or-self::*/twitterLink}" target="_blank">&nbsp;</a>
      <a class="soc-btn twitter" href="{$currentPage/ancestor-or-self::*/linkedInLink}" target="_blank">&nbsp;</a>
    </div>
    

    And here's part of the XML (including the homepage and the product page where the recursive values are not showing in the XSLT)

    <?xml version="1.0" encoding="utf-8"?>
    <!DOCTYPE root[ 
    <!ELEMENT Award ANY>
    <!ATTLIST Award id ID #REQUIRED>
    <!ELEMENT Awards ANY>
    <!ATTLIST Awards id ID #REQUIRED>
    <!ELEMENT Base ANY>
    <!ATTLIST Base id ID #REQUIRED>
    <!ELEMENT Brochure ANY>
    <!ATTLIST Brochure id ID #REQUIRED>
    <!ELEMENT Brochures ANY>
    <!ATTLIST Brochures id ID #REQUIRED>
    <!ELEMENT Client ANY>
    <!ATTLIST Client id ID #REQUIRED>
    <!ELEMENT Clients ANY>
    <!ATTLIST Clients id ID #REQUIRED>
    <!ELEMENT DisplayPage ANY>
    <!ATTLIST DisplayPage id ID #REQUIRED>
    <!ELEMENT Event ANY>
    <!ATTLIST Event id ID #REQUIRED>
    <!ELEMENT Events ANY>
    <!ATTLIST Events id ID #REQUIRED>
    <!ELEMENT FlipBook ANY>
    <!ATTLIST FlipBook id ID #REQUIRED>
    <!ELEMENT FlipBookPage ANY>
    <!ATTLIST FlipBookPage id ID #REQUIRED>
    <!ELEMENT FlipBooks ANY>
    <!ATTLIST FlipBooks id ID #REQUIRED>
    <!ELEMENT Folder ANY>
    <!ATTLIST Folder id ID #REQUIRED>
    <!ELEMENT HeaderLink ANY>
    <!ATTLIST HeaderLink id ID #REQUIRED>
    <!ELEMENT HeaderLinks ANY>
    <!ATTLIST HeaderLinks id ID #REQUIRED>
    <!ELEMENT Homepage ANY>
    <!ATTLIST Homepage id ID #REQUIRED>
    <!ELEMENT ManagementProfile ANY>
    <!ATTLIST ManagementProfile id ID #REQUIRED>
    <!ELEMENT ManagementProfiles ANY>
    <!ATTLIST ManagementProfiles id ID #REQUIRED>
    <!ELEMENT NewsArticle ANY>
    <!ATTLIST NewsArticle id ID #REQUIRED>
    <!ELEMENT NewsArticles ANY>
    <!ATTLIST NewsArticles id ID #REQUIRED>
    <!ELEMENT NewsPage ANY>
    <!ATTLIST NewsPage id ID #REQUIRED>
    <!ELEMENT Product ANY>
    <!ATTLIST Product id ID #REQUIRED>
    <!ELEMENT Products ANY>
    <!ATTLIST Products id ID #REQUIRED>
    <!ELEMENT Reason ANY>
    <!ATTLIST Reason id ID #REQUIRED>
    <!ELEMENT Report ANY>
    <!ATTLIST Report id ID #REQUIRED>
    <!ELEMENT Reports ANY>
    <!ATTLIST Reports id ID #REQUIRED>
    <!ELEMENT ResourceLandingPage ANY>
    <!ATTLIST ResourceLandingPage id ID #REQUIRED>
    <!ELEMENT Resources ANY>
    <!ATTLIST Resources id ID #REQUIRED>
    <!ELEMENT SidebarItem ANY>
    <!ATTLIST SidebarItem id ID #REQUIRED>
    <!ELEMENT SidebarItems ANY>
    <!ATTLIST SidebarItems id ID #REQUIRED>
    <!ELEMENT SiteData ANY>
    <!ATTLIST SiteData id ID #REQUIRED>
    <!ELEMENT SocialMediaLink ANY>
    <!ATTLIST SocialMediaLink id ID #REQUIRED>
    <!ELEMENT SocialMediaLinks ANY>
    <!ATTLIST SocialMediaLinks id ID #REQUIRED>
    <!ELEMENT TeamMember ANY>
    <!ATTLIST TeamMember id ID #REQUIRED>
    <!ELEMENT TeamMembers ANY>
    <!ATTLIST TeamMembers id ID #REQUIRED>
    <!ELEMENT Testimonial ANY>
    <!ATTLIST Testimonial id ID #REQUIRED>
    <!ELEMENT Testimonials ANY>
    <!ATTLIST Testimonials id ID #REQUIRED>
    <!ELEMENT Textpage ANY>
    <!ATTLIST Textpage id ID #REQUIRED>
    <!ELEMENT Video ANY>
    <!ATTLIST Video id ID #REQUIRED>
    <!ELEMENT Videos ANY>
    <!ATTLIST Videos id ID #REQUIRED>
    <!ELEMENT VideosPage ANY>
    <!ATTLIST VideosPage id ID #REQUIRED>
    <!ELEMENT Webinar ANY>
    <!ATTLIST Webinar id ID #REQUIRED>
    <!ELEMENT Webinars ANY>
    <!ATTLIST Webinars id ID #REQUIRED>
    <!ELEMENT Whitepaper ANY>
    <!ATTLIST Whitepaper id ID #REQUIRED>
    <!ELEMENT Whitepapers ANY>
    <!ATTLIST Whitepapers id ID #REQUIRED>
    <!ELEMENT WhyCallout ANY>
    <!ATTLIST WhyCallout id ID #REQUIRED>
    <!ELEMENT WhyCallouts ANY>
    <!ATTLIST WhyCallouts id ID #REQUIRED>
    <!ELEMENT WhyChooseItem ANY>
    <!ATTLIST WhyChooseItem id ID #REQUIRED>
    <!ELEMENT WhyChoosePage ANY>
    <!ATTLIST WhyChoosePage id ID #REQUIRED>
    <!ELEMENT WhyChooseUsLanding ANY>
    <!ATTLIST WhyChooseUsLanding id ID #REQUIRED>
    
    ]>
    <root id="-1">
      <Homepage id="1092" parentID="-1" level="1" creatorID="0" sortOrder="0" createDate="2013-09-05T11:41:29" updateDate="2013-10-02T08:30:49" nodeName="Andera.com" urlName="anderacom" path="-1,1092" isDoc="" nodeType="1050" creatorName="admin" writerName="admin" writerID="0" template="1049" nodeTypeAlias="Homepage">
        <Product id="1789" parentID="1092" level="2" creatorID="0" sortOrder="0" createDate="2013-10-02T07:54:46" updateDate="2013-10-02T09:06:13" nodeName="Our Platform" urlName="our-platform" path="-1,1092,1789" isDoc="" nodeType="1082" creatorName="admin" writerName="admin" writerID="0" template="1081" nodeTypeAlias="Product">
          <umbracoNaviHide>0</umbracoNaviHide>
          <browserTitle />
          <metaKeywords />
          <metaDescription><![CDATA[]]></metaDescription>
          <titleInMenu />
          <hideInSitemap>0</hideInSitemap>
          <UmbracoInternalRedirectId />
          <trustedHeading />
          <caseStudiesLink>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </caseStudiesLink>
          <awardedLabel />
          <awards><![CDATA[]]></awards>
          <clients><![CDATA[]]></clients>
          <contactTitle />
          <contactText><![CDATA[]]></contactText>
          <contactPhoneLabel />
          <contactPhone />
          <footerCopyright><![CDATA[]]></footerCopyright>
          <headerDescription><![CDATA[]]></headerDescription>
          <headerButton>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </headerButton>
          <fullBackground>1790</fullBackground>
          <headerTitle>Mobile Branch</headerTitle>
          <benefits><![CDATA[<h2>Benefits</h2>
    <p class="hidden-phone first-line">oFlows Branch is better than lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco:</p>
    <p><strong>Apply for multiple products</strong> with one application lorem ipsum dolor sit amet, <a href="/">consectetur adipisicing elit</a>, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    <p class="hidden-phone">Helps you <strong>attract more valuable customers</strong>/members outside of your footprint ( <a href="/">online account opening/lending capability</a>) lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
    <p class="hidden-phone">We take care of <strong>connections to other third party systems</strong> lorem <a href="/">ipsum dolor sit amet</a>, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.</p>
    <p class="hidden-desktop">We've been opening accounts online for nearly 10 years – <strong>longer than any other provider</strong> lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do <a href="/">eiusmod tempor incididunt</a> ut labore et dolore.</p>]]></benefits>
          <features><![CDATA[<h2>Features</h2>
    <ul>
    <li>Lorem ipsum dolor sit amet, consectetur adipiscing elit.</li>
    <li>Nunc pellentesque nisl ac orci mollis mattis.</li>
    <li>Proin at nisl lorem, bibendum dignissim justo nulla vel mauris a dui porta consectetur nec eu purus.</li>
    <li>Donec lobortis felis non sem commodo et convallis sem dictum ornare rhoncus metus, porta pellentesque dui rutrum.</li>
    <li class="hidden-phone">In tincidunt bibendum felis, a lacinia quam gravida dictum.</li>
    <li class="hidden-phone">Quisque eu lorem magna, et mattis turpis.</li>
    <li class="hidden-phone">Ut vel nunc at ante viverra sodales a sed felis.</li>
    </ul>]]></features>
          <whyUsMoreButton>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </whyUsMoreButton>
          <howItWorksTitle>Find out how Andera oFlows Branch works</howItWorksTitle>
          <howItWorksSummary><![CDATA[Andera is changing the way banking is done for hundreds of financial institutions across the country. We're making it easier for customers to open accounts and originate loans at any time, across all channels. Whether that's in a branch, at home, or on the road, we help eliminate paper.]]></howItWorksSummary>
          <howItWorksImage>1746</howItWorksImage>
          <howItWorksVideoLink>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </howItWorksVideoLink>
          <resources>
            <MultiNodePicker type="content">
              <nodeId>1353</nodeId>
              <nodeId>1373</nodeId>
              <nodeId>1282</nodeId>
              <nodeId>1283</nodeId>
              <nodeId>1488</nodeId>
              <nodeId>1489</nodeId>
            </MultiNodePicker>
          </resources>
          <resourceButton1>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </resourceButton1>
          <resourceButton2>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </resourceButton2>
          <resourceButton3>
            <url-picker mode="URL">
              <new-window>False</new-window>
              <node-id />
              <url />
              <link-title />
            </url-picker>
          </resourceButton3>
        </Product>
    
        <!--...Removed extraneous...-->
    
        <umbracoNaviHide>0</umbracoNaviHide>
        <browserTitle>Andera - Branch, Online Account Opening &amp; Loan Origination Solutions</browserTitle>
        <metaKeywords>online account opening, branch origination, mobile account opening, customer acquisition services, account origination, risk management, development platform, FortiFI, fraud prevention, identity verification waterfall, account opening, deposit account opening, loan origination solutions, oFlows multichannel platform</metaKeywords>
        <metaDescription><![CDATA[Andera is the leading provider of branch, online account opening and loan origination solutions in the U.S., serving more financial institutions than any other vendor.]]></metaDescription>
        <titleInMenu />
        <hideInSitemap>0</hideInSitemap>
        <UmbracoInternalRedirectId />
        <trustedHeading>Trusted by 500+ Banks &amp; Credit Unions</trustedHeading>
        <caseStudiesLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>Read Our Case Studies</link-title>
          </url-picker>
        </caseStudiesLink>
        <awardedLabel>and awarded by</awardedLabel>
        <awards>
          <MultiNodePicker type="content">
            <nodeId>1788</nodeId>
            <nodeId>1784</nodeId>
            <nodeId>1785</nodeId>
            <nodeId>1109</nodeId>
            <nodeId>1786</nodeId>
            <nodeId>1787</nodeId>
          </MultiNodePicker>
        </awards>
        <clients>
          <MultiNodePicker type="content">
            <nodeId>1186</nodeId>
            <nodeId>1190</nodeId>
            <nodeId>1222</nodeId>
            <nodeId>1249</nodeId>
          </MultiNodePicker>
        </clients>
        <contactTitle>Contact Us</contactTitle>
        <contactText><![CDATA[<p><span>Our 90-person team is made up of bright people who thrive on using technology to make a difference. We're friendly, ethical, and check our egos at the door.</span></p>]]></contactText>
        <contactPhoneLabel>Talk to a human being:</contactPhoneLabel>
        <contactPhone>888.356.1100</contactPhone>
        <footerCopyright><![CDATA[Copyright &copy; [year] Andera, Inc. 15 Park Row West, Suite 200, Providence, RI 02903]]></footerCopyright>
        <headerDescription><![CDATA[]]></headerDescription>
        <headerButton>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url />
            <link-title />
          </url-picker>
        </headerButton>
        <fullBackground />
        <siteName>Andera, Inc.</siteName>
        <headerLogoImage>1730</headerLogoImage>
        <headerDemoLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>See Demo</link-title>
          </url-picker>
        </headerDemoLink>
        <utilityLinks>
          <MultiNodePicker type="content">
            <nodeId>1119</nodeId>
            <nodeId>1121</nodeId>
            <nodeId>1123</nodeId>
            <nodeId>1122</nodeId>
            <nodeId>1762</nodeId>
          </MultiNodePicker>
        </utilityLinks>
        <topNavigation>
          <MultiNodePicker type="content">
            <nodeId>1789</nodeId>
            <nodeId>1094</nodeId>
            <nodeId>1093</nodeId>
            <nodeId>1125</nodeId>
            <nodeId>1126</nodeId>
            <nodeId>1127</nodeId>
          </MultiNodePicker>
        </topNavigation>
        <privacyLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>Privacy Policy</link-title>
          </url-picker>
        </privacyLink>
        <termsOfUseLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>Terms of Use</link-title>
          </url-picker>
        </termsOfUseLink>
        <whyUsTeasers>
          <MultiNodePicker type="content">
            <nodeId>1773</nodeId>
            <nodeId>1111</nodeId>
          </MultiNodePicker>
        </whyUsTeasers>
        <resourceTeasers>
          <MultiNodePicker type="content">
            <nodeId>1373</nodeId>
            <nodeId>1377</nodeId>
            <nodeId>1285</nodeId>
          </MultiNodePicker>
        </resourceTeasers>
        <resourcesWebinarLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>View Webinar Calendar</link-title>
          </url-picker>
        </resourcesWebinarLink>
        <resourcesMoreLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>See More Resources</link-title>
          </url-picker>
        </resourcesMoreLink>
        <whyUsHeading>Why Us?</whyUsHeading>
        <resourcesHeading>Webinars &amp; Resources</resourcesHeading>
        <heroTitle>We make&lt;br /&gt;account opening&lt;br /&gt;awesome.</heroTitle>
        <heroText><![CDATA[Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed ut et dolore magna aliqua.]]></heroText>
        <heroLearnMoreLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>Learn More</link-title>
          </url-picker>
        </heroLearnMoreLink>
        <heroDemoLink>
          <url-picker mode="URL">
            <new-window>False</new-window>
            <node-id />
            <url>#</url>
            <link-title>See Demo</link-title>
          </url-picker>
        </heroDemoLink>
        <heroImage>1775</heroImage>
        <twitterLink>https://twitter.com/AnderaInc</twitterLink>;
        <linkedInLink>http://www.linkedin.com/company/andera</linkedInLink>;
      </Homepage>
    
      <!--...Removed extraneous...-->
    
    </root>
    
  • Chriztian Steinmeier 2720 posts 8225 karma points MVP 4x admin c-trib
    Oct 02, 2013 @ 17:02
    Chriztian Steinmeier
    0

    Hi Nik,

    Using my approach works for me, so just to be sure that this was what you tried - instead of this:

    <xsl:value-of select="$currentPage/ancestor-or-self::*/contactText" disable-output-escaping="yes"/> 
    

    I do this:

    <xsl:value-of select="$currentPage/ancestor-or-self::*[normalize-space(contactText)][1]/contactText" disable-output-escaping="yes"/>
    

    You're saying this doesn't work in your installation, right?

    EDIT: I wrote a description of how this works as a reply to a previous question here.

    /Chriztian

  • Nik Wahlberg 639 posts 1237 karma points MVP
    Oct 02, 2013 @ 17:39
    Nik Wahlberg
    0

    Hi Chriztian, I was playing around with macro caching and now it's working all of a sudden (no changes). Could it be something with that (I made sure to leave Cache by Page checked).

Please Sign in or register to post replies

Write your reply to:

Draft