<%@ page import="java.sql.*" %> <%@ page import="java.util.*" %> <%@ page import="java.text.*" %> <%@ page import="com.assorted.affiliate.data.*" %> <%@ page import="com.assorted.affiliate.display.*" %> <%@ include file="/jsp/session-handler.jsp" %> AssortedInternet.com - HOW TO: Customize the Look and Feel <%@ include file="/ssi/header.html" %>
 
HOW TO: CUSTOMIZE LOOK AND FEEL
 
 
<%@ include file="/ssi/products-menu-v3.html" %>

Customizing

Ideally, you would want the Download Directory produced by the CGI Download Manager to look like the rest of your web site. Fortunately, the CGI Download Manager makes use of a simple templating system which allows you to easily change the Download Directory look and feel.

Template File

The CGI Download Manager uses a template file called:

  • files.tmpl

By default we provide a very basic files.tmpl template that will produce a no-frills Download Directory. If you open up the file you will see it contains the following HTML:


<html>
	<head>
	<title>Download Directory</title>
	</head>
	
	<body>

	<-- CGI Download Manager Inserts HTML Here: --> 
	<FilesContentHere>

	</body>
</html>

Everything in the basic template file should look familiar, with one exception. The CGI Download Manager uses a special tag which is used by the script itself. That tag is shown below:

  • <FilesContentHere>

This tag is very important and must be included in your template file. The CGI Download Manager uses this tag as the placeholder where it inserts the Download Directory HTML it generates into your template.

Customizing the Template File

To customize the template, simply edit the files.tmpl file. You can make any changes you like to the HTML structure within. The only thing that must keep is the special tag:

  • <FilesContentHere>

This tag should be located in the location in your HTML code where you want the CGI Download Manager to insert the Download Directory code. You can change anything else you like.

We recommend making your template changes and testing them iteratively. So, make a few changes, and then regenerate your Download Directory. Check how the pages look to see if you have achieved the desired effect. If not, then make a few more tweaks and try again. It shouldn't take long before you get the desired output.

Using Scripting

You can include scripting commands and code in your template. So, if your web site uses PHP, JSP, SSI or some other scripting technology you can use the same scripting code in your template file.

By default, the CGI Download Manager generates your Download Directory using a .html file extension. If you want to use scripting technology, you will need to change the file extension to match the extension of your scripting pages.

For example: If you are using PHP technology on your web site, and you want to include PHP code in your template, you can do so easily. Once you've added the PHP code to your template, you will need to make a configuration change in the file:

  • files.config

Open the configuration file and look for the following line:

  • $OUTPUT_FILE_EXTENSION = "shtml";

You will need to change this setting to match the proper extension for your scripting files. In this case, the line should read:

  • $OUTPUT_FILE_EXTENSION = "php";

Once you have made this change be sure to reupload the files.config configuration file and regenerate your Download Directory. This will make your changes become effective and your scripting code should execute properly.

<%@ include file="/ssi/footer.html" %>