Page.xsl Tutorial

What is it? What does it do?

Page.xsl is the xsl file that sets up the overall layout of the page. It sets up your page to be a 2X2 table. The first row (the header) has a colspan of 2. On the next row, the left cell is the sidebar and the right cell is the main part of the page. Page.xsl also checks the resources.xml file for the actor name and role so it can put these in the header

Here is the basic structure of a page setup using page.xsl



It is important to note that all of this default behaivor can be edited by simply editing page.xsl or creating an all new xsl file that fits your needs and these changes will be reflected on all of your pages.

Editing Page.xsl keeping the basic layout

If you want to keep the basic layout but change the logos, colors, etc to match your website then you are in luck becuase this is quite simple.

First thing you will want to do is put your own logos in you will want to look through page.xsl file to the point where the header is set up (the file is commented to help you along look for <!-- Header -->. In this block of code you should see the image references for both the the left and right logos (also commented for your convenience). Simply change these href's to point to the appropriate images and you are done.

Next you will probably want to change the look at and feel of the header. You can do this in the same block of code we just edited. Simply do your regular HTML chanes to the table that is set up to change the background color, text color or any other attribute you wish.

Another popular edit is to add a background to the entire page (including sidebar) to do this you will want to put the background image page in the body tag for the entire page (it is marked with the comment <!-- body tag -->)

Everything else on the page is specified in the resources.xml file for information on this please refer to Resources.xml tutorial

Editing Page.xsl and not keeping basic layout

Depending on the severity of the changes that you intend to make it might make sense for you to develop an entirely new xsl file to fit your needs. The possiblities for changes are endless Page.xsl is fairly well commented to help you navigate through and decipher what each block of code is doing so feel free to add and delete items to suit your needs.