IF/Then Logic
-
I had posted this in the themes and projects forum but, after thinking about it I felt this was more of an idea/development 'thing.' so am posting it here. I will go remove it from the other forum... (nevermind...the forum will not let me delete it over there!)
We need to somehow incorporate IF/THEN or rules login into the theming engine. Perhaps this can be controlled through various XML files...?
Such that, if certain values passed by XML content are not properly formatted, empty, or escaped somehow, the theme will respond accordingly.
Like if instead of
<releasedate>19851018T000000</releasedate>
in a gamelist.xml file, it reads<releasedate>VARIOUS</releasedate>
, the theme will return the text instead of a date?IF <releasedate> != "" { RETURN <releasedate>; } ELSE { RETURN "VARIOUS"; }
...or something like that, Is this possible? This would allow theme developers a little more license in the design/layout of their theme where appropriate.
-
-
@cdaters I don't know anything about the internal workings of Emulation Station or its themes, I just want to point out that this is already kind of included with the videos and screenshots, as most themes with video support display the screenshot if no video is present.
-
@clyde you are correct.
What I was suggesting has more to do with dates or descriptions, say at a game-list view when using folders to separate/categorize your games by alpha-numeric naming (0-9,A, B, C, D, ... etc.). You may have a folder display called "A" and it may contain games that span the years of 80-83, etc.
So instead of displaying a single date (like it would normally for a single game) it will display "Various" to encompass all of them.
If in the
gamelist.xml
file, instead of the element reading<releasedate>19920101T000000</releasedate>
it was<releasedate></releasedate>
or<releasedate>Various</releasedate>
you would just see "Various" in the theme.I am thinking of a scenario where instead of listing 100's/1000's of titles in a single display, breaking them up in the theme to be more manageable for the end user...
-
@cdaters hmm, and if you maintain a set of collections? (Games starting with A, Games starting with B, etc.)? This works out-of-the-box already (and the TL/TR for paging in the game list as well as the Jump to... letter in the options menu, too).
Contributions to the project are always appreciated, so if you would like to support us with a donation you can do so here.
Hosting provided by Mythic-Beasts. See the Hosting Information page for more information.