Customizing Layouts

Customizing App Layouts - There are several different ways to customize your application, but we'll go over a couple ways here overriding XCONF & HTML files. NOTE: It is ill-advised to store custom files within the ROOT/WEB-INF/base directory. This directory and its contents are generated by EnterMedia. You should always place custom files within the directory of an application (e.g. emshare2).

HTML Example (Overriding the footer for your application)

Create a footer.html file here {application name}/theme/layouts. If this directory structure doesn't exist, then create it.

Now, whatever you put in this file will be injected into the footer section of your application site. For example, footer.html:

 <center> Test Company &copy; 2013 </center> 

XCONF Example (Adding a custom download size) 

Suppose that you want to create a custom crop for previewing and downloading image assets. The best way to go about this would be to override some properties in a _site.xconf file within your application's directory and specifically within {applicationname}/views/modules/asset/downloads/preview.

For instance, if I create a sub-folder called "rosetest" and placed a _site.xconf file within it: {applicationname}/views/modules/asset/downloads/preview/rosetest/_site.xconf, then when accessing assets with "rosetest" in my URL, the properties in the _site.xconf will override those established in the _site.xconf in base. Here is an example _site.xconf file that overrides some cropping/viewing properties:

 <?xml version="1.0" encoding="UTF-8"?> <page> <property name="assetrootfolder">/${applicationid}/views/modules/asset/downloads/preview/rosetest</property> <generator name="convertArchiveDocument"/> <property name="crop">true</property> <property name="prefwidth">300</property> <property name="prefheight">300</property> <property name="x1">0</property> <property name="y1">0</property> <property name="uselegacythumbimages">false</property> <property name="sourcefile">image</property> </page>