IUPUI is Indiana's premier urban research university. The campus enrolls more than 30,000 students in 21 schools and academic units.
These instructions are to incorporate the IUPUI web template into a site hosted on the IU central web servers, Webserve, which replaced Champion and Veritas in spring 2008.
On this page:
What you will be doing is making a virtual folder on your web space that refers back to the files used for the main IUPUI website. These files include the header and footer. These files are automatically updated as the IUPUI webmaster upgrades the main site. These files are called "includes" because one line of code includes them from the central server. Click the image below to see a very basic HTML page in the IUPUI template.
By using the template, the only parts of the page you will need to change are the navigation and the section in blue—the "main div." You will create the navigation include for your site, but then you will only need to use one line of code to refer it on each page in your site. We'll get to that in a bit. First, let's install Sitetools, so we can access all those fancy includes.
Sitetools allows you to access central resources for IUPUI sites. This folder will contain symbolic links to the header and footer files used in the IUPUI template. You will never have to update these files, as they are maintained in one place by Communications and Marketing.
Note: If you don't have an SSH client installed, you can download one through IUWare. See At IU, what SSH clients are supported and where can I get them?.
Keep in mind you will also need to have the ability to transfer files (FTP). Most SSH clients either include or offer an FTP or SFTP (secure FTP), so download that as well. For more on FTP, see What is FTP, and how do I use it to transfer files?
ln -s /ip/iuihome/sitetools sitetools
Once entered, you will see a mirror of the Sitetools folder within your account. You will not be able to modify these files, but it will ensure that you always have the most current version of these shared includes. The important files you will want to link include head2.inc and foot.inc. These resources can be used from any tilde account hosted on the IU systems central servers (http://www.iupui.edu/~accountname/) by simply linking to the root-relative /sitetools/filename.extension.
Your browser won't automatically know what to do with an include file, so we modify the .htaccess file to tell it how to read includes. To do this follow the directions below:
The .htaccess file is not easily recognized by programs such as Dreamweaver. However, you can easily use Wordpad on a PC to create this file.
Options -Indexes Options +Includes AddHandler server-parsed .html AddHandler server-parsed .htm AddHandler server-parsed .inc
Now you have your web space, which includes a folder called sitetools and a file called .htaccess. Let's create your navigation file include. This file can be modified at any time, and will then be reflected across all pages.
<div id="leftNav"> <h2><a href="http://www.iupui.edu/~yoursite/">Home</a></h2> <ul> <li id="head2" class="subhead"><a href="http://www.iupui.edu/">Heading 1</a> <ul id="head2-sub"> <li><a href="http://www.iupui.edu">Page 1</a></li> <li><a href="http://www.iupui.edu">Page 2</a></li> <li><a href="http://www.iupui.edu">Page 3</a></li> </ul> </li> <li id="head3" class="subhead"><a href="http://www.iupui.edu/">Heading 2</a> <ul id="head3-sub"> <li><a href="http://www.iupui.edu">Page 1</a></li> <li><a href="http://www.iupui.edu">Page 2</a></li> <li><a href="http://www.iupui.edu">Page 3</a></li> </ul> </li> </ul> </div>
The code above as it is would render this.
The only edits you should make on this are the URLs and the page names. You will want to replace "Home" with your site name. You can add or subtract pages as you, as long as you use the same scheme. Do not change things like "leftNav" as these are pulled directly off the IUPUI style sheet, and refer to it. If you change the "id" or "class" you will not be consistent with the template.
Now comes the fun part! We'll create a basic HTML page, which will draw from the includes, and you'll have a basic template page for your site, which you can then modify and copy to build your site.
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> <head> <title>Page Name : Department Name : IUPUI</title> <!--#include virtual="/sitetools/head2.inc"--> <!--#include virtual="/nav_test.inc"--> <div id="main" class="column wide"> <h2>Title</h2> <p>Text</p> </div> <!--#include virtual="/sitetools/foot.inc"-->
IUPUI is Indiana's premier urban research university. The campus enrolls more than 30,000 students in 21 schools and academic units.