Broken Access list item data in a different list
#1
I can't seem to access data from one list in another list.

I have a fake list of inprogress tvshows that contains one item and I need to pass the data to another list:-

xml:
<control type="list" id="9002">
  <itemlayout />
  <focusedlayout />
  <content sortby="playcount" sortorder="ascending" limit="1" type="videos">videodb://inprogresstvshows/$INFO[Container(9001).ListItem.DBID]/-2/?tvshowid=$INFO[Container(9001).ListItem.DBID]</content>
</control>

I can access this data in a standard label:-

xml:
<control type="label">
  <label>$INFO[Container(9002).ListItem.Title</label>
</control>

Works perfectly as expected, however if I try to access the data from another list's layout it doesn't work:-

xml:
<control type="list" id="9000">
  <itemlayout >
    <control type="label">
      <label>$INFO[Container(9002).ListItem.Title</label>
    </control>
  </itemlayout>
  <focusedlayout >
    <control type="label">
      <label>$INFO[Container(9002).ListItem.Title</label>
    </control>
  </focusedlayout>
  <content>   This list already has content  </content>
</control>

Is this a bug?
Reply
#2
You need to put it in the content of the list.
Reply
#3
(2021-07-10, 18:34)Hitcher Wrote: You need to put it in the content of the list.

Sorry I don't understand, put what in the content of which list?

Perhaps my example was confusing, my list 9000 already has it's own content, I just want to overlay data from another list (9002) into list 9000's layouts.
Reply
#4
He means
Code:

<content>
<item>
<property name="othercontainerlabel">$INFO[Container(9002).ListItem.Title</property >
</item>
</content>

Accessing other info labels or properties outside of a container doesn't really work. It's like a "sandbox".
Main: Lancool II Mesh  - Ryzen 9 5900x - MSI x570 Unify - Zotac RTX 3080 AMP HOLO - 32GB Trident Z Neo 3600 CL16 -  EVO 960 M.2 250GB / EVO 940 250GB / MX100 512GB /  Crucial P1 2TB / WD Blue 3D Nand 2TB 
Sound: Saxx AS30 DSP - Beyer Dynamic Custom One Pro 
TV: Nvidia Shield 2019 Pro- Adalight 114x LEDs - Sony 65XG9505 - Kodi / Emby - Yamaha RX-V683 - Heco Victa 700/101/251a + Dynavoice Magic FX-4
Server: i3 Skylake - 8GB - OMV4 - 22TB Storage
Reply
#5
(2021-07-11, 10:20)sualfred Wrote: He means
Code:

<content>
<item>
<property name="othercontainerlabel">$INFO[Container(9002).ListItem.Title</property >
</item>
</content>

Accessing other info labels or properties outside of a container doesn't really work. It's like a "sandbox".

Unfortunately that doesn't work as my list 9000 is driven by content from a plugin, so I can't just add extra properties to the items.
Reply
#6
Hi, i don't know if

<control type="label"> <label>$INFO[Container(9002).ListItem.Title</label> </control> is just a typo here in forum or if used in code

if so <control type="label"> <label>$INFO[Container(9002).ListItem.Title]</label> </control>
may is a easy fix.

idea 2
unsure, but try before test the another workaround
$INFO[Container(9002).ListItem(0).Title]
or
$INFO[Container(9002).ListItemListItemAbsolute(0).Title]

idea3
If all other fail : may its worth a workaroound, by using hidden control to hold the items (depending worth using how many Listitems you will need)

like
xml:
<control type="label" id="4">
   <visible>Integer.IsGreater(Container(9002).NumItems,0) | Container(9002).IsUpdating</visible>
   <label>$INFO[container(9002).ListItem.**label**]</label>
   <include content="HiddenObject" />
 </control>

and use
$INFO[Control.GetLabel(4)] for your real layout in container 9000

But's just an idea Wink
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#7
(2021-07-11, 11:10)mardukL Wrote: Hi, id ont know if

<control type="label"> <label>$INFO[Container(9002).ListItem.Title</label> </control> is justn a typo here in forum or used in code

if so <control type="label"> <label>$INFO[Container(9002).ListItem.Title]</label> </control>
may its easy fix.

idea 2
or unsure instead before try the  another workaround
$INFO[Container(9002).ListItem(0).Title]

idea3
If not may its worth a workaroound, by using hidden control to hold the items (depending worth using how many Listitems you will need)

like
xml:
<control type="label" id="4">
   <visible>Integer.IsGreater(Container(9000).NumItems,0) | Container(9000).IsUpdating</visible>
   <label>$INFO[container(9000).ListItem.**label**]</label>
   <include content="HiddenObject" />
 </control>

and use
$INFO[Control.GetLabel(4)] for your real layout in container 9001

But's just an idea Wink

Yep, that was just a typo in the forum post.

Idea 2, tried that and is doesn't work Sad

Idea 3... D'oh... That works perfectly.... I've use that method in other places in my skin and never even thought of using it here, guess that's what happens when you stare at code too long Big Grin

Thanks
Reply

Logout Mark Read Team Forum Stats Members Help
Access list item data in a different list0