Copied to clipboard

Flag this post as spam?

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


  • JLon 316 posts 458 karma points
    Oct 02, 2016 @ 20:54
    JLon
    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

  • JLon 316 posts 458 karma points
    Oct 02, 2016 @ 21:06
    JLon
    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

  • JLon 316 posts 458 karma points
    Oct 02, 2016 @ 21:19
    JLon
    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 2698 posts 8108 karma points MVP 3x 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