Dynamic List Content onclick
#1
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

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?
Reply
#2
Sure - just set the path in your plugin. You can also set various properties on the items such as node:target_url and the like, which allows them to have a different click action to their path (so the skin can use ListItem.Path to do stuff, but on click it'll execute something else). The details are in the thread on dynamic content on the forums here - see the skin dev section.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
cool thank you, I will have a read and see what I can work out.
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic List Content onclick0