horizontal fixedlist wrapped in a vertical fixedlist
#1
Title hopefully explains the question - but here goes.

I have created an include that is basically a horizontal menu of tiles. I want to be able to embed several of this onto my homepage, and have them be inside a fixedlist that is vertical. Is this possible, could someone help me out? Below is the code that I've currently got. The goal is to pass a collection of HomeWidgets to a new fixedlist

xml:
<control type="group">
<top>675</top>
<!--Main Menu-->
<include>HomeWidget</include>
<control type="image">
<colordiffuse>FFFFFFFF</colordiffuse>
<height>205</height>
<left>0</left>
<texture background="true">custom/widget/tile_border.png</texture>
<top>0</top>
<width>380</width>
</control>
</control>

Looking for possibly something like this?
xml:
<include content="HomeWidget">
<content>...</content>
</include>

My thought is that HomeWidget would provide the entire framework for how to build this include, and all you need to pass it is content of <item>, etc.
Reply
#2
I can't even figure out how to pass the '<content>' in as an include param? Surely this is possibly, right? otherwise the includes aren't really dynamic?

I've tried:

xml:
<include name="HomeWidget">
<param name="content"/>
<definition>
<control type="fixedlist">
<focusposition>0</focusposition>
<left>0</left>
<onleft>700</onleft>
<onright>700</onright>
<orientation>horizontal</orientation>
<scrolltime tween="quadratic" easing="out">700</scrolltime>
<itemlayout width="380" height="220">
<control type="group">
<control type="image">
<colordiffuse>FF1F1F1F</colordiffuse>
<height>197</height>
<left>3</left>
<texture background="true">custom/widget/tile_bg.png</texture>
<top>3</top>
<width>374</width>
</control>
<control type="label">
<align>center</align>
<aligny>center</aligny>
<font>font37</font>
<height>197</height>
<label>$INFO[ListItem.Label]</label>
<left>3</left>
<top>3</top>
<width>374</width>
</control>
</control>
</itemlayout>
<focusedlayout width="380" height="220">
<control type="group">
<control type="image">
<colordiffuse>FF1F1F1F</colordiffuse>
<height>197</height>
<left>3</left>
<texture background="true">custom/widget/tile_bg.png</texture>
<top>3</top>
<width>374</width>
</control>
<control type="label">
<align>center</align>
<aligny>center</aligny>
<font>font37</font>
<height>197</height>
<label>$INFO[ListItem.Label]</label>
<left>3</left>
<top>3</top>
<width>374</width>
</control>
</control>
</focusedlayout>
<content>$PARAM[content]</content>
</control>
</definition>
</include>

I also tried this without placing the actual <content> tags and just tried passing in the list of <item> but nothing seems to work, it only works if the content is directly inside of that include, which doesnt really help me out as i need to be able to require this include like 10 times giving it new content each time
Reply
#3
https://kodi.wiki/view/Skinning_Manual#U...n_includes

Includes/params are not truly dynamic. They are evaluated once on window load. Think of $PARAM as basically being equivalent to cut and paste text.

I'm guessing you are calling the include incorrectly.
Includes need to be called like so (replacing videodb://movies/title with your desired content path)
Code:
<include content="HomeWidget">
    <param name="content" value="videodb://movies/titles" />
</include>

If you want to use static items (e.g. <item>) in your <content> tags, then you need to do a little more work.
Usually what I do is call a separate include with my items in it
e.g.
Code:
<include name="MyItems">
    <item>
        <label>foobar</label>
        <onclick>foobar</onclick>
    </item>
    [etc ...]
</include>

Then inside the content tags of your "HomeWidget" include, call the MyItems include like so
Code:
<content><include condition="$PARAM[include_myitems]">MyItems</include></content>

This allows you to pass a param as a boolean to the HomeWidge include
e.g.
Code:
<include content="HomeWidget">
    <param name="include_myitems" value="true" />
</include>

You can also do multiple items like so
Code:
<content>
    <include condition="$PARAM[include_myitems]">MyItems</include>
    <include condition="$PARAM[include_myotheritems]">MyOtherItems</include>
</content>
Code:
<include content="HomeWidget">
    <param name="include_myitems" value="true" />
    <param name="include_myotheritems" value="false" />
</include>
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#4
Also, you can't put a wraplist/fixedlist/list/panel control inside another list control. The only possibility is putting them inside a grouplist control (but not the other way around - i.e. grouplist inside a list doesn't work).
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
we recently added support for nested includes: https://github.com/xbmc/xbmc/pull/11850
perhaps that's something you can use in this case?
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
#6
Interesting, so you can pass content to an include as long as its in some 'value="videodb://movies/titles"' format of a path, but you cant pass in raw xml? So if I'm doing it this way as you suggested, is there a way I can actually look at what format videodb://movies/titles is actually providing? I'm looking at this from a web development perspective, where in javascript frameworks we create 'components' that we can pass the data to.. so lets say the component is simply a list of elements, and we'd call like <my-component data="someVar"/> which would populate the list with the data inside of someVar.
Reply
#7
@jurialmunkey since I cannot nest these list's.. I'm not sure if you're a netflix subscriber or not, but that is the menu I am trying to build. I have achieved the individual row widget where the 'selected border' stays in place, and the fixedlist scrolls left to right inside of it - but my next goal was to have rows of these widgets, where I can up and down action from widget to widget, where the widgets would slide behind the fixed selected border instead of the cursor itself moving. Perhaps this is a limitation of Kodi that I have to just deal with?
Reply
#8
Code:
<include content="HomeWidget">
    <param name="content" value="videodb://movies/titles" />
</include>

doing it this way: how would the include definition look to accept content?
Reply
#9
(2018-03-28, 01:20)z1haze Wrote:
Code:
<include content="HomeWidget">
    <param name="content" value="videodb://movies/titles" />
</include>

doing it this way: how would the include definition look to accept content?

Code:
<content>$PARAM[content]</content>

https://kodi.wiki/view/Skinning_Manual#F...ic_content
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#10
How do I know what the paths are to the data that I want, and how do I know what the data actually looks like? Is there wiki page or something that shows paths and examples of what the data looks like?
Reply
#11
videodb://movies/titles is the internal path for the Movies Titles section of the video library database.
See here for other paths: https://kodi.wiki/view/Opening_Windows_and_Dialogs

You can also use folder paths. And you can use the special:// protocol to call specific kodi locations
https://kodi.wiki/view/Special_protocol

You can also call plugins
e.g. plugin://script.skin.helper.widgets/?action=next&mediatype=episodes&reload=$INFO[Window(Home).Property(widgetreload)]

You can get the path of the current library view by using $INFO[Container.FolderPath] in a label outside the container.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#12
(2018-03-28, 01:13)z1haze Wrote: @jurialmunkey since I cannot nest these list's.. I'm not sure if you're a netflix subscriber or not, but that is the menu I am trying to build. I have achieved the individual row widget where the 'selected border' stays in place, and the fixedlist scrolls left to right inside of it - but my next goal was to have rows of these widgets, where I can up and down action from widget to widget, where the widgets would slide behind the fixed selected border instead of the cursor itself moving. Perhaps this is a limitation of Kodi that I have to just deal with?

There are a few ways you might achieve this:

You can put the fixedlists inside a vertical grouplist. If you make the grouplist height the same as the widget height, then you can scroll up and down between widgets and keep the same position.

If you want to show multiple widgets but keep them all the same place, it gets a bit trickier. In Aura I use a pretty convoluted hack where I use negative spacing and oversized containers to keep the same position when scrolling vertically. However, it is a fairly convoluted hack that is difficult to explain (and it breaks mouse support).

The other alternative is to use slide animations that are conditional based upon the list id that is currently focused, though this can be pretty tricky to get right as well.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#13
Or another method is to use a vertical list where each item is actually made up of multiple items from hidden lists. This is how I mimicked the original Fire TV UI for fTV skin.
Reply

Logout Mark Read Team Forum Stats Members Help
horizontal fixedlist wrapped in a vertical fixedlist0