If your website is located under http://www.physics.byu.edu/ then you are already set to use the template! Skip to the Using the Template section to learn how to activate and use the web template on your site. If you run into any trouble or have any questions about using this template, please contact the CSR Office.
If your site is located someplace other than http://www.physics.byu.edu/ (for example, http://planetarium.byu.edu) you will need to contact the CSR Office before using the web template. Once your site has been prepared you will be able to used the template as described below.
Your website must be located on the Windows webserver in order to use this template.
The first step in using the ASP template is to rename all your HTM or HTML files to be ASPX files. For example, index.html would become index.aspx. This allows the file to be processed by the template engine.
To enable the template for a page, you must add a line to the top of each file. This tells the server to wrap your page inside the template. To enable the template, add this line to the top of each page:
<%@ Page Inherits="WebTemplate.Template" %>
Thus, for each page you want to use the template, your file would look something like this (when viewed from a text editor):
<%@ Page Inherits="WebTemplate.Template" %> <html> <head> <title>Title of the Page</title> </head> <body> </body> </html>
To have the template applied to a page, the top line must be present. The html, head, title, and body tags are not required but for best results should be present as well. Place web content in-between the body tags, and edit the contents in-between the title tags to the page title desired.
Important: For a web page to work with the template, its file extension must be .aspx and not .htm or .html. default.aspx is the default page for a site and is shown if no specific page is requested.
To use the template, you will need to create and/or edit several files. These files give the template the information it needs to build your page. In all these files, any lines beginning with a # symbol are ignored. See the following sections for details on these files.
This text file controls navigation menu headers and links on the left side of a page. Usage is very simple. Any line without an equals sign (=) is a header for a group of links, and any line with an equal sign will become a link where the text of the link is before the = and the URL is the text after the =. For example, the Computer Support NavMenu.txt looks like this:
| NavMenu.txt Contents | Resulting Page Menu |
|---|---|
General Information Support and Policies = Default.aspx Computer Facilities = facilities.php Trouble Ticket = trouble/new.php Getting an Account = gettingaccount.aspx Poster Printing = PosterPrinting.aspx Spam Filter Configuration = spam/ Spam Filtering = spam.aspx Computer Help Change Your Password = change_password.aspx Burning a CD/DVD = burn_cd.aspx Remote P-Drive = pdrive.aspx Remote Desktop Server = remote.aspx Installing Printers = printers.aspx Faculty and Staff My Documents Policy = mydocuments.aspx Webmail Access = webmail.aspx VPN Client = vpn.aspx Web Template = webtemplate.aspx |
|
In this example, the Web Template menu item is highlighted because it is the current page.
This text file controls the Related Links section on the left side of a page underneath the navigation menu. It works exactly like the NavMenu.txt file. This is a good place to put links of interest to the viewer not related to local navigation.
This text file allows you to set many options related to the page such as the author's name, the page title, the feedback link, the title bar image, and others. An example Fields.txt file is shown below:
SiteTitle = Computer Support ContactName = Mark Erickson PersonID = 21
Following is a list of all currently supported Fields.txt file options as well as explanations for what they control.
The following fields are REQUIRED for correct operation of the template. Every site should provide values for the following fields:
SiteTitle = Computer Support
SiteTitle = [string] sets the overall title for the website. This title is used at the top of all pages
in the site and will be used as the page title for pages that do not explicity define a title using the
<title> tag. In this example, the site title is "Computer Support" and the result is shown below:
ContactName = Mark Erickson
ContactName = [string] is followed by the name of the person or group that is responsible for maintaining
the website. This will appear at the bottom of each page. In this example, the maintainer is listed as
"Mark Erickson" and the result is shown below:
PersonID = 21
PersonID = [number] is followed by the ID number of the person responsible for handling feedback and questions
about a site. You can find this number by going to the
Faculty and Staff directory and choosing a person. The address of the page will show the person's ID number
In this example, Mark Erickson's ID number is "21", as shown by the address for his page on the directory:
http://www.physics.byu.edu/directory.aspx?personID=21
The following are optional fields you can set to control the layout and information provided by the template. You do not need to provide these fields, if left unset they will stay at the default setting.
TitleImage
TitleImage = [URL] sets the image to use in the title bar found at the top of the page. You can set this value
if you want your site to use an image other than the default
one provided by the template. You must specify the absolute URL to the image. For example, you might put
TitleImage = http://www.physics.byu.edu/faculty/jsmith/title.jpg. Do NOT put only TitleImage = title.jpg.
If you want to create your own title bar picture, the image should be 640 x 75 pixels. The fading effect begins at
approximately 150 pixels from the left edge of the image.
As an example, we have created a title image from the ESC Planetarium. If you were to add the line TitleImage =
http://www.physics.byu.edu/images/planetariumTitleBar.jpg to your Fields.txt, you would see something like this:
MenuTitle
MenuTitle = [string] sets the text used on the upper-level navigation menu for your site. By default, this menu's value
is determined by checking the following sources, in order:
The first value found is used. As an example, if you were to set MenuTitle = Upper Level Menu in Fields.txt, you would
see something like:
Template Widgets are special features unique to the ASP.NET version of the web template. These allow you to insert dynamic controls into your pages with little or no effort on your part. Currently the template offers the following Widgets:
Featured Research
The Featured Research widget displays the web features (as shown on the Department Homepage) that you have added to the website. It has the same functionality and look as the Department Feature panel of the homepage, but is customizable so it only shows the features you have uploaded.
Usage:
Place the following line where you want the widget to be placed:
<Physics:FeaturedResearch PersonID="#" runat="server" />
Options:
PersonID: To control what features are displayed, use the PersonID attribute of the widget. This person's
features will be displayed.
Example:
The following is an example using the Web Features that
Branton Campbell has uploaded:
If you require further assistance using the web site template, please contact the CSR Office.