Dynamic Content List Onclick?
#1
Hi.. How do i set the list of dynamic content to show Play Movies / Play trailer onclick?

Image

I changed it to call from variables..
Code:
                <content target="video">$VAR[DefWidgetContent]</content>

But how do i put this ?

Code:
<onclick condition="!IsEmpty(Window(0).Property(PlaylistLastMovieMenu31.Trailer))">Skin.SetString(custom_trailer,$INFO[Window(0).Property(PlaylistLastMovieMenu31.railer)])</onclick>
<onclick>ActivateWindow(1101)</onclick>

Can't find any samples or skin that uses this..

thanks
Reply
#2
is the content provided by a plugin or by a vfs path?
if it's the latter, then it's not possible to change the onclick behaviour.
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Reply
#3
(2015-07-20, 09:18)ronie Wrote: is the content provided by a plugin or by a vfs path?
if it's the latter, then it's not possible to change the onclick behaviour.

The content is provided by Playlists... i guess that's VFS path..?
So there's no way to get onclick behavior like that?
I used dynamic list because i need to get faster loading time.. it was really slow with randomandlastitem...

Or is there any plugin that could give similar result?
Reply
#4
(2015-07-20, 10:16)denywinarto Wrote:
(2015-07-20, 09:18)ronie Wrote: is the content provided by a plugin or by a vfs path?
if it's the latter, then it's not possible to change the onclick behaviour.

The content is provided by Playlists... i guess that's VFS path..?
So there's no way to get onclick behavior like that?
I used dynamic list because i need to get faster loading time.. it was really slow with randomandlastitem...

Or is there any plugin that could give similar result?

You could use a fake button to control the list (with Control.Move() ). that's pretty workaround-ish though and doesnt work well for all use cases.
Donate: https://kodi.tv/contribute/donate (foundation), 146Gr48FqHM7TPB9q33HHv6uWpgQqdz1yk (BTC personal)
Estuary: Kodis new default skin - ExtendedInfo Script - KodiDevKit
Reply
#5
(2015-07-20, 14:28)phil65 Wrote:
(2015-07-20, 10:16)denywinarto Wrote:
(2015-07-20, 09:18)ronie Wrote: is the content provided by a plugin or by a vfs path?
if it's the latter, then it's not possible to change the onclick behaviour.

The content is provided by Playlists... i guess that's VFS path..?
So there's no way to get onclick behavior like that?
I used dynamic list because i need to get faster loading time.. it was really slow with randomandlastitem...

Or is there any plugin that could give similar result?

You could use a fake button to control the list (with Control.Move() ). that's pretty workaround-ish though and doesnt work well for all use cases.

I see.. Black also recommended this in Dynamic list thread..
But i can't figure out how to do it correctly.. .mind giving an example?


I tried this on Ace (bottom control) to call window 1101 that contains "play trailer" menu...
But it doesn't seem to work..

Edit :
I think i'm getting the idea now..

Code:
            <control type="button">
                <onleft>Control.Move(510,-1)</onleft>
                <onright>Control.Move(510,-1)</onright>
                <onup>Control.Move(510,-1)</onup>
                <ondown>Control.Move(510,1)</ondown>
                <onclick>ActivateWindow(1101)</onclick>
            </control>

tried this but it doesn't work.. 510 is the control ID that i get when i focus on the content list...
What did i miss here?

Also,, Any chance this will be implemented in the future ..Something like onclick attribute for custom onclick action?
Reply
#6
(2015-07-20, 14:28)phil65 Wrote:
(2015-07-20, 10:16)denywinarto Wrote:
(2015-07-20, 09:18)ronie Wrote: is the content provided by a plugin or by a vfs path?
if it's the latter, then it's not possible to change the onclick behaviour.

The content is provided by Playlists... i guess that's VFS path..?
So there's no way to get onclick behavior like that?
I used dynamic list because i need to get faster loading time.. it was really slow with randomandlastitem...

Or is there any plugin that could give similar result?

You could use a fake button to control the list (with Control.Move() ). that's pretty workaround-ish though and doesnt work well for all use cases.
By Fake button you mean something like this?
Image

Aeon MQ6 is the only skin that has Dynamic Listing + Play trailer so far,
but this is not suitable for Ace i think, because Ace uses 2 rows of items (6x2)

Any other options?
Reply
#7
Yeah not possible with a panel list. Plus fake button controls to move a list are pretty buggy anyway.

Not really any other options. I think if you write a content provider plugin you can control the onclick action from there - but thats a pretty excessive "solution"
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
(2015-08-03, 05:52)jurialmunkey Wrote: Yeah not possible with a panel list. Plus fake button controls to move a list are pretty buggy anyway.

Not really any other options. I think if you write a content provider plugin you can control the onclick action from there - but thats a pretty excessive "solution"

Oh well. guess i'll wait til they update it to enable onclick action..
Reply
#9
It's possible if you make a hidden list with your content and then make a panel using the content from that list, this way you'll have control over the onclick actions.
Reply
#10
(2015-08-03, 09:37)Hitcher Wrote: It's possible if you make a hidden list with your content and then make a panel using the content from that list, this way you'll have control over the onclick actions.

Any skins that use this?
Kinda difficult for me to figure out without samples..
Reply
#11
fTV if you can wade your way through the home code. Wink
Reply
#12
(2015-08-04, 08:15)Hitcher Wrote: fTV if you can wade your way through the home code. Wink

Image

This one isn't it?
It doesn't use panels either so i'm not sure how this would be applicable to Ace..
Hmm.. Isengard only, can't install it yet i think i'm afraid Isengard might break something in my custom skin ...
Cool skin btw Smile
Reply
#13
Hide the list containing the content -

PHP Code:
<control id="101" type="list">
    <
visible>false</visible>
    <
content target="video">$VAR[DefWidgetContent]</content>
</
control

Then make another list where you set the onclick actions and fill it's content like this -

PHP Code:
<content>
    <
item>
        <
label>$INFO[Container(101).ListItemPosition(0).Label]</label>
        <
icon>$INFO[Container(101).ListItemPosition(0).Icon]</icon>
        <
onclick condition="!IsEmpty(Window(0).Property(PlaylistLastMovieMenu31.Trailer))">Skin.SetString(custom_trailer,$INFO[Window(0).Property(PlaylistLastMovieMenu31.railer)])</onclick>
        <
onclick>ActivateWindow(1101)</onclick>
        <
visible>!IsEmpty(Container(101).ListItemPosition(0).Label)</visible>
    </
item>
...
</
content
Reply
#14
I found that if you add the lists with setStaticContent the onclick works nicely. And its blazingly fast compared to using the plugin structure.. peace out. Sorry for the ressurection!
Reply

Logout Mark Read Team Forum Stats Members Help
Dynamic Content List Onclick?0