(2019-02-17, 17:54)Dumyat Wrote: from what i can work out a widget screen is made up like this
(2019-01-09, 09:30)the_other_guy Wrote: they all need to be in a number range say 5000 to 5900
<control type="group" id="5000">
<visible>String.IsEqual(Container(9000).ListItem.Property(id),name)</visible>
<include content="Visible_Right_Delayed">
<param name="id" value="name"/>
</include>
<control type="grouplist" id="5001">
<include>WidgetGroupListCommon</include>
<pagecontrol>5000</pagecontrol>
<!---WidgetScrollbar --> <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)">
<param name="scrollbar_id" value="5010"/>
</include>
</control>
Something I've never quite understood properly is where the all these ID values actually come from? Are they created by the skin author and listed somewhere within the skin, or are they a Kodi system requirement and listed somewhere?
Same with the all the list ID values on the home menu widget items. I have changed a few items in the past on my Home Menu to suit my own taste, but have normally done so by using an existing ID value. What I really like to know is if you wanted to add a completely new menu or widget item for instance, what ID values would you use in that scenario?
a menu item
xml:
<item>
<label>$LOCALIZE[24001]</label>
<property name="menu_id">$NUMBER[8000]</property>
<onclick>ActivateWindow(1100)</onclick>
<thumb>icons/sidemenu/addons.png</thumb>
<property name="id">addons</property>
<visible>!Skin.HasSetting(HomeMenuNoProgramsButton)</visible>
</item>
<label>$LOCALIZE[24001]</label> get the name from kodi can be chanded to any thing <label>internet tv</label>
<property name="menu_id">$NUMBER[8000]</property> this is the screen that is shown with the widgets on them it will need to be the same as any new screen you add
<onclick>ActivateWindow(1100)</onclick> is link for any file (see link by adding iten to favourites )
<thumb>icons/sidemenu/addons.png</thumb> is an image icon
<property name="id">addons</property> this is the name of the page with the widgets
<visible>!Skin.HasSetting(HomeMenuNoProgramsButton)</visible> setting to hide menu
a page
xml:
<!-- <control type="group" id="20000"> -->
<!-- <visible>String.IsEqual(Container(9000).ListItem.Property(id),custom1)</visible> -->
<!-- <include content="Visible_Right_Delayed"> -->
<!-- <param name="id" value="custom1"/> -->
<!-- </include> -->
<!-- <control type="grouplist" id="20001"> -->
<!-- <include>WidgetGroupListCommon</include> -->
<!-- <pagecontrol>20010</pagecontrol> -->
<!-- enter widget content -->
<!-- </control> -->
<!-- <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)"> -->
<!-- <param name="scrollbar_id" value="20010"/> -->
<!-- </include> -->
<!-- </control> -->
<!-- --> code comment do not add<!-- <control type="group" id="20000"> --> is the number of the page any thing in this page nees to be say (20000 - 20999)
<!-- <visible>String.IsEqual(Container(9000).ListItem.Property(id),custom1)</visible> -->kodi info the only bit to change is the last name custom1 would be the name of the new page
<!-- <include content="Visible_Right_Delayed"> -->kodi no need to change
<!-- <param name="id" value="custom1"/> --> to tel kodi what the page is it should be the same as String.IsEqual(Container(9000).ListItem.Property(id),custom1
<!-- </include> --> close off the tag
<!-- <control type="grouplist" id="20001"> -->this is to start the widget area of the page and need to be in the same range of (20000 - 20999)
<!-- <include>WidgetGroupListCommon</include> --> kodi code
<!-- <pagecontrol>20010</pagecontrol> --> this is to move to items in the page can be left at 10 in the number range (21010 22010)
<!-- enter widget content --> widget code gose here
<!-- </control> -->close off the tag
<!-- <include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)"> -->kodi code
<!-- <param name="scrollbar_id" value="20010"/> --> value="20010 can be left at 10 in the number range (21010 22010)
<!-- </include> -->close off the tag
<!-- </control> -->close off the tag
a widget just copy fro the list on the has what you need
xml:
<include content="WidgetListCategories" condition="Library.HasContent(music) + !Skin.HasSetting(home_no_categories_widget)">
<param name="content_path" value="library://music/"/>
<param name="widget_header" value="$LOCALIZE[31148]"/>
<param name="widget_target" value="music"/>
<param name="list_id" value="7900"/>
</include>
can be just <include content="WidgetListCategories">
<param name="content_path" value="library://music/"/> this is the path for the file (library:// musicdb:// read the kodi home.xml to work out)
<param name="widget_header" value="$LOCALIZE[31148]"/> name of widget that will be shown on screen
<param name="widget_target" value="music"/> can be type of content (movie read the kodi home.xml to work out)
<param name="list_id" value="7900"/> is the number of the widget set to the same as <control type="group" id=""> of page
</include>close off the tag
a working page
xml:
<control type="group" id="22000">
<visible>String.IsEqual(Container(9000).ListItem.Property(id),extendedinfo)</visible>
<include content="Visible_Right_Delayed">
<param name="id" value="extendedinfo"/>
</include>
<control type="grouplist" id="22001">
<include>WidgetGroupListCommon</include>
<pagecontrol>22010</pagecontrol>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=upcomingmovies"/>
<param name="widget_header" value="Upcoming movies"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22100"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=incinemamovies"/>
<param name="widget_header" value="TheMovieDB In-cinema movies"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22200"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=popularmovies"/>
<param name="widget_header" value="TheMovieDB Popular movies"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22300"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=topratedmovies"/>
<param name="widget_header" value="Top rated movies"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22400"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=ratedmovies"/>
<param name="widget_header" value="Rated movies"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22500"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=airingtodaytvshows"/>
<param name="widget_header" value="TV shows airing today"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22600"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=onairtvshows"/>
<param name="widget_header" value="On-the-air TV shows"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22700"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=topratedtvshows"/>
<param name="widget_header" value="Top rated TV shows"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22710"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=populartvshows"/>
<param name="widget_header" value="Popular TV shows"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22720"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=ratedtvshows"/>
<param name="widget_header" value="Rated TV shows"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22730"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
<include content="WidgetListSquare">
<param name="content_path" value="plugin://script.extendedinfo/?info=ratedepisodes"/>
<param name="widget_header" value="Rated episodes"/>
<param name="widget_target" value=""/>
<param name="list_id" value="22740"/>
<param name="sortby" value="lastused"/>
<param name="sortorder" value="descending"/>
</include>
</control>
<include content="WidgetScrollbar" condition="Skin.HasSetting(touchmode)">
<param name="scrollbar_id" value="22010"/>
</include>
</control>