Page History: Create Display Profile
Compare Page Revisions
Page Revision: 2020/12/09 19:33
Introduction
The display profiles used in the Collection Management application when operating in display mode is based on HTML, CSS, JavaScript, XSLT and XML, and allows you to create and customise the template either to make small adjustments for personal preferences, or create a fully new template in your preferred design.
Technically, the Collection Management application generates an XML file for each of the individual media types "Disc Title", "Movie", "Movie Collection", "TV Series", "TV Series Season" and "TV Series Episode" and this XML file is then passed though an XSLT transformation, and displayed in a browser area in the application.
This approach have been selected because it makes up for the most simple solution for allowing user customisation of the templates, while still maintaining the functionality needed to create a rich display experience of the individual media types.
Getting Started
The display profiles is created in the directory "C:\ProgramData\My Movies\FileStorage\User Customization\Display Profiles", and it is recommended to start by creating a copy of the existing "default" template, by copying the following files, and naming them "myprofile" instead of "default", while maintaining the respective file extensions.:
default.xml
Disc Title\default.xslt
Movie\default.xslt
MovieCollection\default.xslt
TVEpisode\default.xslt
TVSeason\default.xslt
TVSeries\default.xslt
Note! We use "myprofile" throughout the guide as a name for your customised display profile, but the choice of name is up to you.
The first thing to do after copying the files is to edit the "myprofile.xml" file, and changing the "Name" attribute of the "DisplayProfile" root node, and name it "My Profile".
You now have a copy of the default template, which you can customise. To edit the displayed content, you should edit each of the "XSLT" profile files.
Each of the XSLT files links to some shared XSLT files, which we recommend maintaining. The "functions.xslt" contains shared functions which are and can be used in the main templates, and the "cover.xslt" file contains a function for displaying disc title covers and movie, movie collection and tv series posters, respecting the default options in the application for applying HD graphics, and maintaining a common aspect ratio of the displayed covers and posters.
Additionally, there is a link to a "stylesheet.css", which we recommend copying to "myprofile.css", and changing the link in the "XSLT" profile files - please do not edit the stylesheet.css or any other of the included files in the application, but instead create a copy of them, and edit them with your own naming.
Your custom profile can now be selected by right clicking the display area in the Collection Management - should the XSLT template or the XML template definition at any time be edited to be invalid, you will get an error message when selecting a title of the respective type, and you will then have to correct your template.
Editing the XSLT templates requires a relatively good knowledge of XLST, HTML, CSS and JavaScript, which you can research on other sources - while we can help with question on how to work with template customisation, we cannot help with technical questions of the general work with XSLT, HTML, CSS or JavaScript.
The XML sources
The XML files used as base for the XSLT transformation differs in design based on the profile type, as they have been created and designed in much different times in the application, and the profile types technically work differently - the XML files are with some adjustments the same XML files used for communication between our online service and the various applications, and they are therefore not redesigned for the display profile functionality. These differences in layout of the XML files can lead to a little confusion, but if you have the knowledge to work with XSLT and HTML, we are sure that you will manage this as well, and, we are always available for questions on the layout of these.
If you in the "Help", "Debug" menu of the Collection Management application enable debug, and enable it on "High", the application will store the XML files used to pass to the XSLT transformation when selecting a title in the application, into the folder "C:\ProgramData\My Movies\FileStorage\User Customization\Display Profiles\Debug", which you can then use to review the XML files to determine how to build your XSLT file.
Localization
The display profile functionality, and the default template is created to support localisation, allowing the templates to work with all languages - we recommend maintaining this localisation, in case you would like to share your template with other users.
To avoid having to pass the full localisation files to the templates, the template definition file (myprofile.xml) has a LocalizationStrings node, with subnodes for each string the application should include as a localised string and store in the XML file before passing it to the XSLT template - all strings available in the application in full can be seen by opening the "localization_1033.xml" file from "C:\ProgramData\My Movies\Localization" - do NOT in any way edit or append to this file, as it potentially will cause the application to not work, and if appending new strings, they will be overwritten when new strings are added to the application. If you would like a template to be useable with localisation, and you need additional strings, you may request for us to add these strings for you.
In the XML files passed to the XSLT template, the values for string based content of the profiles will typically exist both as the original value, and with a "Localized" node attribute containing the localised value, making both available to you.
Sharing your template
If you would like to share your template with other users, you are welcomed to do that on our forums, in the user customisation sub-forum: https://www.mymovies.dk/forum.aspx?g=topics&f=35
If we find your template to bring great value, we may ask you if we can include your template as a default template in the applications future releases - this does however require that the template fully supports all localisation functionalities. If the template does not, and we find it to be of high enough value, we may suggest that we help localising it, in case it is not already localised.