Copied to clipboard

Flag this post as spam?

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


  • Jay 413 posts 639 karma points
    Oct 02, 2016 @ 20:54
    Jay
    0

    nuPickers XML Radio button rendering from URL source data

    Hi all,

    I'm planning to try out the nuPickers XML radio button with the XML Data field set the URL.

    I've got an xml that i'm reading from with the format below

    <?xml version="1.0" encoding="utf-8"?>
    <root>
      <layouts>
        <layoutTest>
              <image id="001" name="big"><![CDATA[/assets/img/layouts/big.png]]></image>
              <image id="002" name="small"><![CDATA[/assets/img/layouts/small.png]]></image>
              <image id="003" name="medium"><![CDATA[/assets/img/layouts/medium.png]]></image>
        </layoutTest>
      </layouts>
    </root>
    

    I've got the below set but the radio button is not rendering. can't figure out why? It should ad least display the name

    Any idea? Appreciate any help on this. Thanks

    enter image description here

  • Jay 413 posts 639 karma points
    Oct 02, 2016 @ 21:06
    Jay
    0

    Found some weird thing. The property only load when it comes with the nodeId of the page you are viewing.

    Eg if i'm on a page with an id of 1124

     <?xml version="1.0" encoding="utf-8"?>
        <root>
          <layouts>
            <layoutTest id="1124">
                  <image id="001" name="big"><![CDATA[/assets/img/layouts/big.png]]></image>
                  <image id="002" name="small"><![CDATA[/assets/img/layouts/small.png]]></image>
                  <image id="003" name="medium"><![CDATA[/assets/img/layouts/medium.png]]></image>
            </layoutTest>
          </layouts>
        </root>
    

    The ID of 1124 will need to be in the XML in order for it to work? Meaning that if I'm loading the property in another page. It will not work. Is there any way (apart from generating the xml dynamically) that I can use a static xml config to render the radio button list with nuPickers?

    Appreciate any help on this. Thanks

  • Jay 413 posts 639 karma points
    Oct 02, 2016 @ 21:19
    Jay
    0

    All i need is to render a radiobutton as a list for the user which I can then use the Custom Label to generate image (with the user of Macros).

    Is there any other alternative like a better nuPicker property that I can use? I might be using the wrong nuPickers.

  • Chriztian Steinmeier 2798 posts 8788 karma points MVP 7x admin c-trib
    Oct 03, 2016 @ 00:14
    Chriztian Steinmeier
    101

    Hi JLon,

    The issue with the ID is a side-effect of the way the $ancestorOrSelf token has been implemented (I guess). It's meant for when you're querying the Content tree...

    You should be able to use this XPath to get your nodes:

    /root/layouts/layoutTest/image

    Hope that helps,

    /Chriztian

Please Sign in or register to post replies

Write your reply to:

Draft