2014-05-08, 02:54
Hi,
I have some dynamic content being feed back to a skin to populate a list, see bottom of this page "Plugin provided content"
http://wiki.xbmc.org/index.php?title=Sta...st_Content
The problem I am having is the onclick of the items populated can not be set in the skin, it looks like the onclick is always being set by the URL of the dynamically generated list items.
I want to have onclick set in the definition of the itemlayout, example
the onclick XBMC.RunScript is being ignored and only the ListItem url that was passed into the dynamic items is used when you click on an item.
if I put static items in like this and remove the onclick from the above label
<content>
<item id="1">
<label>My First Item</label>
<onclick>XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)</onclick>
<visible>true</visible>
</item>
</content>
it works fine
simple question is, can I override the onclick of dynamic data or can I pass in a url that runs a script?
I have some dynamic content being feed back to a skin to populate a list, see bottom of this page "Plugin provided content"
http://wiki.xbmc.org/index.php?title=Sta...st_Content
The problem I am having is the onclick of the items populated can not be set in the skin, it looks like the onclick is always being set by the URL of the dynamically generated list items.
I want to have onclick set in the definition of the itemlayout, example
PHP Code:
<control type="panel" id="50">
<left>380</left>
<top>520</top>
<width>860</width>
<height>120</height>
<onleft>9000</onleft>
<onright>61</onright>
<onup>61</onup>
<ondown>9000</ondown>
<viewtype label="">list</viewtype>
<pagecontrol>61</pagecontrol>
<scrolltime>200</scrolltime>
<orientation>vertical</orientation>
<itemlayout height="40" width="430">
<control type="label">
<left>10</left>
<top>0</top>
<width>410</width>
<height>40</height>
<font>font12</font>
<align>left</align>
<aligny>center</aligny>
<selectedcolor>blue</selectedcolor>
<info>ListItem.Label</info>
</control>
</itemlayout>
<focusedlayout height="40" width="430">
<control type="label">
<left>10</left>
<top>0</top>
<width>410</width>
<height>40</height>
<font>font12</font>
<align>left</align>
<aligny>center</aligny>
<selectedcolor>white</selectedcolor>
<info>ListItem.Label</info>
<onclick>XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)</onclick>
</control>
</focusedlayout>
<content target="video">$INFO[ListItem.Property(CastPluginLink)]</content>
</control>
the onclick XBMC.RunScript is being ignored and only the ListItem url that was passed into the dynamic items is used when you click on an item.
if I put static items in like this and remove the onclick from the above label
<content>
<item id="1">
<label>My First Item</label>
<onclick>XBMC.RunScript(plugin.video.xbmb3c,PersonInfo,mode=15&name=Jack+Black)</onclick>
<visible>true</visible>
</item>
</content>
it works fine
simple question is, can I override the onclick of dynamic data or can I pass in a url that runs a script?