EmberMediaManager.org
Ember Media Manager
star_faded.png
Please log in to subscribe to updates for this article
How to create your own HTML Export Template
Last updated at Sun Apr 17 18:57, by Cocotus

How to create your own HTML Export Template ⇑ top

First we take a look to an existing template in Ember Manager. Let’s take a look at „template“ in Ember:
  • template structure1
    template structure1icon_open_new.png
Each template in Ember consists of static and dynamic HTML. In the above picture all dynamic sections of the template are marked red. As you see we have GENRE, PLOT, TITLE, PATH and YEAR information of the movie as dynamic parts.

Now let’s take a look on the HTML file by opening the „English_(en_US).html“ file of the template. You can find this file under „../LANGS/html/template“ This HTML File is the basic file which is parsed during the Ember HTML Build process. Basically it’s simple HTML code mixed with javascript and maybe CSS style elements - for people who already have some experience in building homepages and internet sites this is nothing new. However there are some special rules which apply to the Ember template file. Now let’s open the template file with a text editor. As you see it starts with some CSS style definitions followed by some javascript functions. For now let’s move to the HTML section which produces the layout of the page:

  • template structure2
    template structure2icon_open_new.png


Now the interesting part is the declaration of ONE MOVIE section (using the <$MOVIE> tag). Following rules apply: #Inside this tag you will define the layout of the movie information/presentation. #Inside MOVIE section you can use valid Ember variables like $YEAR, §MOVIENAME, $FILENAME, $PLOT and $GENRES.... Each of this variable will be replaced with the specific information from Ember database. #The MOVIE section will be repeated for every single movie during the Ember HTML Build process. Because of that the variable $COUNT is important as it is used to distinguish between movies in the template, i.e. if you have a colleciton of 43 movies, COUNT will range from 1 to 43

Maybe it’s easier to understand if you take a look at the HTML code created by Ember after exporting the HTML Template:

  • template structure3
    template structure3icon_open_new.png


As you can see the variables have been replaced with the specific Ember database information. Also you see that the MOVIE section is generated for each movie of your collection. Fort he first movie you see that number „1“ was inserted for COUNT , fort he second movie it’s „2“. This information is used in the „onclick“ event of the movie information to call a function and sending an ID (COUNT, like „1“, „2“) to the function at the same time.

This is it! You now have the basic knowledge to create some HTML Movie Templates of your own. Below is a list of valid EMBER variables you can use in the MOVIE section to query and output specific movie information:
       
Special Strings
        <$COUNT>
        <$DIRNAME>
        <$FILENAME
        <$FILESIZE>
        <$PATH>
        <$SET> 'All sets which movie belongs to, seperated with ";"
        <$NOW> 'Save Build Date. might be useful info!
        <$TOTAL_MOVIES>
        <$TOTAL_TVEPISODES>
        <$TOTAL_TVSHOWS>


Images
        <$BANNER>
        <$CLEARART>
        <$CLEARLOGO>
        <$DISCART>
        <$FANART>
        <$LANDSCAPE>
        <$POSTER>
	   
NFO Fields
        <$ACTORS>
        <$CERTIFICATIONS>
        <$COUNTRIES>
        <$CREDITS>
        <$DATEADDED>
        <$DATEMODIFIED>
        <$DIRECTORS>
        <$GENRES>
        <$IMDBID>
        <$LANGUAGE>
        <$LASTPLAYED>
        <$LISTTITLE>
        <$MPAA>
        <$ORIGINALTITLE>
        <$OUTLINE>
        <$PLAYCOUNT>
        <$PLOT>
        <$RATING>
        <$RELEASEDATE>
        <$RUNTIME>
        <$STUDIOS>
        <$TAGLINE>
        <$TAGS>
        <$TITLE>
        <$TMDBCOLID>
        <$TMDBID>
        <$TOP250>
        <$TRAILER>
        <$VIDEOSOURCE>
        <$VOTES>
        <$YEAR>


Audio
        <$AUDIO>
        <$AUDIOBITRATE>
        <$AUDIOCHANNELS>
        <$AUDIOLANGUAGE>
        <$AUDIOLONGLANGUAGE>
        <$DETAILALLAUDIO>
        <$AUDIOALLBITRATE>
        <$AUDIOALLCHANNELS>
        <$AUDIOALLLANGUAGE>
        <$AUDIOALLLONGLANGUAGE>


Subtitle
        <$SUBTITLELANGUAGE>
        <$SUBTITLELONGLANGUAGE>
        <$SUBTITLETYPE>


Video
        <$VIDEO>
        <$VIDEOASPECT>
        <$VIDEOBITRATE>
        <$VIDEODIMENSIONS>
        <$VIDEODURATION>
        <$VIDEOFILESIZE>
        <$VIDEOHEIGHT>
        <$VIDEOLANGUAGE>
        <$VIDEOLONGLANGUAGE>
        <$VIDEOMULTIVIEW>  3D Support if > 1 -> 3D Movie
        <$VIDEOSCANTYPE>
        <$VIDEOSTEREOMODE>
        <$VIDEOWIDTH>


Article attachments

There are no file attached to this article

Article comments (0)

There are no comments