Editing XMBML Folder Trees

Jump to navigation Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 1: Line 1:
= An XMB item tree =
= An XMB item tree =
This is an example of an [[XMBML Coding|XMBML]] file composed by a main XMB item which will act as a folder opening up into 3 other XMB folder items.
For this we will make a XMB item which will act as a folder opening up into 3 other XMB items.


First create the root XMB item which acts as a folder
1/ First create the root XMB item which acts as a folder
{{Boxcode|code=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
<View id="root">
<View id="XMB_Folder_1">
<Attributes>
<Attributes>
<Table key="folder_tree_main">
<Table key="xmb_folder">
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="title"><String>Main folder, contains 3 subfolders</String></Pair>
<Pair key="title"><String>XMB Menu Item</String></Pair>
<Pair key="info"><String>This will subdivide into 3 items :)</String></Pair>
<Pair key="child"><String>segment</String></Pair>
<Pair key="child"><String>segment</String></Pair>
</Table>
</Table>
</Attributes>
</Attributes>
<Items>
<Items>
<Query class="type:x-xmb/folder-pixmap"  key="folder_tree_main" attr="folder_tree_main" src="#seg_folder_tree_main_container" />
<Query class="type:x-xmb/folder-pixmap"  key="xmb_folder" attr="xmb_folder" src="#XMB_Folder_1_container" />
</Items>
</Items>
</View>
</View>
Line 20: Line 21:
Important Notes:
Important Notes:
* I've used "''&lt;Query class="type:x-xmb/folder-pixmap"''" for &lt;Items&gt; sub-entry type as it is good for displaying menus.  
* I've used "''&lt;Query class="type:x-xmb/folder-pixmap"''" for &lt;Items&gt; sub-entry type as it is good for displaying menus.  
* The 'attr' in the &lt;Items&gt; sub-entry is the same as the table key in Attributes, so those attributes are asociated
* The 'attr' in the &lt;Items&gt; sub-entry (xmb_folder) is the same as the table key in Attibutes, so those attributes are assigned to the xmb_folder &lt;Items&gt; sub-entry.
* the 'src' is using the character # that works as a link to load another "view id" segment in the current .xml
* the 'src' is pointing to 'XMB_Folder_1_container' - the another XMB .xml entry in the current .xml
* the 'icon_rsc' is the "default folder" icon loaded from a .rco (and available for all XMB columns)
* the icon is from a .rco file and is a basic folder icon, like what the 'Game Data' XMB item uses
* 'title' is in plain text  
* 'title' and 'info' are in plain text  
* 'child' is set as 'segment' so the XMB knows this item will subdivide into other XMB items  
* 'child' is set as 'segment' so the XMB knows this item will subdivide into other XMB items  


In order to create a working XMB sub menu the root xmb item must have its 'src' linking to a "container" (its the best way to think about it) and not directly linking to XMB items in the sub menu.( If you do not do this when you select your root XMB item to display a sub menu, the 'output' or 'action' of the XMB items of the sub menu will be shown rather than the actual XMB items):
In order to create a working XMB sub menu the root xmb item (in this "XMB_Folder_1") must have its 'src' linking to a "container" (its the best way to think about it) and not directly linking to XMB items in the sub menu.( If you do not do this when you select your root XMB item to display a sub menu, the 'output' or 'action' of the XMB items of the sub menu will be shown rather than the actual XMB items):


{{Boxcode|code=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
<View id="seg_folder_tree_main_container">
<View id="XMB_Folder_1_container">
<Items>
<Items>
<Query class="type:x-xmb/folder-pixmap"  key="whatever" src="#seg_folder_tree_main_contents" />
<Query class="type:x-xmb/folder-pixmap"  key="xmb_folder_container" src="#XMB_Folder_1_contents" />
</Items>
</Items>
</View>
</View>
Line 38: Line 39:
Important Notes:
Important Notes:
* This has no attributes as it simply acts as a contents container/linker
* This has no attributes as it simply acts as a contents container/linker
*The key is just an identifyer, you can use any name


Now to create the segment which holds the sub menu items:
Now to create the XMB .xml entry which holds the sub menu items:


{{Boxcode|code=<syntaxhighlight lang="xml">
{{Boxcode|content=<syntaxhighlight lang="xml">
<View id="seg_folder_tree_main_contents">
<View id="XMB_Folder_1_contents">
<Attributes>
<Attributes>
<Table key="folder_tree_subfolder_1">
<Table key="xmb_subitem_1">
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="title"><String>Subfolder 1</String></Pair>
<Pair key="title"><String>XMB Sub Menu Item</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_file</String></Pair>
<Pair key="info"><String>Dummy Sub item 1</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair>
</Table>
</Table>
<Table key="folder_tree_subfolder_2">
<Table key="xmb_subitem_2">
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="title"><String>Subfolder 2</String></Pair>
<Pair key="title"><String>XMB Sub Menu Item</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_file</String></Pair>
<Pair key="info"><String>Dummy Sub item 2</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair>
</Table>
</Table>
<Table key="folder_tree_subfolder_3">
<Table key="xmb_subitem_3">
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="icon_rsc"><String>tex_album_icon</String></Pair>
<Pair key="title"><String>Subfolder 3</String></Pair>
<Pair key="title"><String>XMB Sub Menu Item</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_file</String></Pair>
<Pair key="info"><String>Dummy Sub item 3</String></Pair>
<Pair key="str_noitem"><String>msg_error_no_gamedata</String></Pair>
</Table>
</Table>
</Attributes>
</Attributes>
<Items>
<Items>
<Query class="type:x-xmb/folder-pixmap"  key="folder_tree_subfolder_1" attr="folder_tree_subfolder_1" />
<Query class="type:x-xmb/folder-pixmap"  key="xmb_subitem_1" attr="xmb_subitem_1" />
<Query class="type:x-xmb/folder-pixmap"  key="folder_tree_subfolder_2" attr="folder_tree_subfolder_2" />
<Query class="type:x-xmb/folder-pixmap"  key="xmb_subitem_2" attr="xmb_subitem_2" />
<Query class="type:x-xmb/folder-pixmap"  key="folder_tree_subfolder_3" attr="folder_tree_subfolder_3" />
<Query class="type:x-xmb/folder-pixmap"  key="xmb_subitem_3" attr="xmb_subitem_3" />
</Items>
</Items>
</View>
</View>
Line 72: Line 75:
* These are dummy items, they do not 'go anywhere' or perform any function. They will just print the str_noitem message when clicked because they have no function
* These are dummy items, they do not 'go anywhere' or perform any function. They will just print the str_noitem message when clicked because they have no function
* notice how the &lt;attr&gt; from the &lt;Items&gt; sub entries matches the &lt;Table keys&gt; from the &lt;Attributes&gt; sub entries
* notice how the &lt;attr&gt; from the &lt;Items&gt; sub entries matches the &lt;Table keys&gt; from the &lt;Attributes&gt; sub entries
* The &lt;Attributes&gt; and the &lt;Items&gt; sub entries do not have to be in the same order to work


{{File Formats}}<noinclude>
{{System Firmware}}<noinclude>[[Category:Main]]</noinclude>
[[Category:Main]]
</noinclude>
Please note that all contributions to PS3 Developer wiki are considered to be released under the GNU Free Documentation License 1.2 (see PS3 Developer wiki:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following hCaptcha:

Cancel Editing help (opens in new window)