Geremy Cohen - 2007-03-09

ActiveGrid HOWTO

Name: HowTo Add Custom Logo To AG Application
Author: Chris Keene
Created Date: 3/9/07
Tested Against: 2.2.2

Often, you may want to add your own custom logo to an ActiveGrid file. The following HowTo shows you how to create an XForm layout element that you can use anywhere in your application to add your logo. Typically, you would want to put your logo on the Page Frame Xform, which would automatically display the logo on every file in your application.

1.    Create a custom layout file File menu -> new -> new document -> layout

2.    Add new custom layout. Press New button, enter name “MyLogo”, description “MyLogo”, assign to “groups” checkbox

3.    Cut and paste the text below into the layout form between the first and last lines that say </ag:layout>

4.    Save file (click upper left hand icon to save file), named mylayouts

5.    Add that layout file to your project Project menu ->Add active file to project

6.    Copy the logo you want to display to the ./static/images directory in your ActiveGrid project

7.    Edit the MyLogo custom layout to display the image

8.    Add the new layout file to the PageFrame. In the PageFrame, right click on the Page Title Bar frame element. Select Insert group -> Other -> MyLogo

Note that the .lyt file follows a css syntax, so most css commands can be entered into an .lyt file.

Here is the layout file content to display a logo:

<table width="100%" height="88" border="0" background="<%= item.resolveImageURL('images/banner_bg.gif') %>" cellspacing="0" cellpadding="0">

<tr>

<td align="left" nowrap="true"><img border="0" hspace="0" vspace="0" src="<%= item.resolveImageURL('images/activegrid logo.gif') %>"/></td>

<td align="right" nowrap="true"><img border="0" hspace="0" vspace="0" src="<%= item.resolveImageURL('images/banner_right.gif') %>"/></td>

</tr>

</table>