BYU Home page BRIGHAM YOUNG UNIVERSITY  
Search BYU 
Directories and Filenames
This page is under construction.

Some of the information may be inaccurate or incomplete. Thank you for your patience as we continue to work at developing a useful and attractive web site.

If you have suggestions or comments or would like to see completion of this page given special priority, please let us know.

Table of Contents
Go Down to Content

Find out what files you need and how to work with them to use the ECEn XML templates.

Choosing filenames for your web page
To make things easier for people visiting you web pages and the ECEn XML Templates, here are some guidelines to follow when coming up with filenames:
Use filenames that are brief, but descriptive.
Avoid spaces or other potentially weird characters such as <,>,#,& etc... Underscores ('_') don't count as weird characters.
If you want the page to be the default page brought up for that directory in case the user doesn't specify a filename in that directory, use the name index.phtml. For instance, when users type www.ece.byu.edu/ in their browser, the browser returns the index.phtml file from the main web directory.
Technically you can use any case for your filenames, but the ECEn web server and the ECEn XML Templates are case sensitive, so it's much easier to remember if you always use lowercase letters. Make sure you use correct case for your index.phtml files. The web server will not look for InDEx.phtml or iNDEX.phtml or any other variation of case when it visits a directory looking for index.phtml.

Setting up files for a new ECEN XML Web Page
Every ECEn XML Web Templates page needs two files in the same directory:
page_name.xml
page_name.phtml
1
Create the .xml file. If you wish, you can download the starter xml page from the Howdy World Tutorial. (Right click on the link and choose Save Link As...)
2
Create the .phtml file by creating an empty text file and pasting the following line within it:
<? include("/var/www/include/xml_templates_3_8/template.php"); ?>
Or, you may download this standard .phtml file. (Right click and Save Link As...) You must rename this file to whatever you named the .xml file (but with .phtml on the end instead of .xml).
An .xml file with an empty or missing .phtml file will not render!

Be careful on Windows: Some Windows applications might try to append extra file extensions to your newly created .xml and .phtml files. These extra extensions will break the ECEn templates. You can avoid this problem when you save your file. Be sure to watch near the bottom of the Save dialog box and select 'All Files' in the 'Save as Type:' drop down menu.

Things not working? Read about troubleshooting broken .phtml files.

Using relative and absolute links
Relative and absolute links within ECEn XML web pages work the same way they do within normal web pages.

What are relative and absolute links? A relative link is a link that references a page with reference to the current web page. A relative link pointing to the same location could be different on every web page.

Here are some example relative link locations:

instructions.phtml

You can tell this link is relative because it is not clear by just looking at the link where it references. Which instructions.phtml do they really mean? You can tell once you know this link is from a certain web page, foo.phtml, within a given directory. With that information, you know the link points to the instructions.phtml within the same directory as foo.phtml.

../index.phtml

This is another relative link. Again, without knowing the context of the link it is hard to know exactly which index.phtml the link refers to. The .. indicates that that this index.phtml resides in the parent directory of the web page where this link resides, say foo.phtml. If foo.phtml resides in directory foo/, and foo/ resides in directory bar/, then this link references the index.phtml located within directory bar/.

/index.phtml

This final relative link is kind of tricky, because for the filesystem it isn't relative. No matter what ECEn web page this link resides on, it always points to the same place. However, for different web servers, such as the BYU CS Dept. web pages, this link would point to a different place. / points to the root of the web server file system, which for the ECEn web server, corresponds to the ECEn home page.

An absolute link does not depend on the location of the page it's contained in to figure out where it points to.

http://www.ee.byu.edu/news/

You can tell this is an absolute link because no matter what page this link is on, it will always point to the ECEn Main News page.

Using <parent-page> tags
To specify the breadcrumb, or list of links in in the left corner of the web page, we use <parent-page> tags.

The parent page should specify a page that would leads you to this web page. For example, the parent page of the ECEn Main News page is the ECEn home page because there are links on the ECEn home page that lead you directly to the ECEn home page.
A sample breadcrumb.
[image]
If you are setting up a web page for your ECEn research group, an appropriate parent page would be the ECEn home page. If you are setting up a class web page, you might want to use the ECEn class directory for your parent page.

Within your own web pages, use parent page tags to show how your pages relate to one another. For a web page detailing your course syllabus, an appropriate parent page would be your main class home page.

Use absolute links to XML files for parent pages.

For more information about how to set up parent pages, see The Howdy World Tutorial.

Maintained by The ECEn Web Team. Based on v. 3.8 of the ECEn web templates (view XML, live XML, see other formats).
Copyright © 1994-2005. Brigham Young University. All Rights Reserved.