Introduction
Libraries, templates, and include files are important ways to make site maintenance easier. In this project, you will create simple web sites that demonstrate how to use a library, a template, and an include file. Take a moment to review this table so you can begin to understand the differences between the technologies. Use the learning resources to help you complete the project.
| Library | Template | Include | |
|---|---|---|---|
| used for | elements that repeat on multiple pages (like navigation bars or footers) | entire page layouts/designs that repeat on multiple pages | elements that repeat on multiple pages (like navigation bars or footers) |
| how | When you change the Library item in Dreamweaver, it automatically updates all pages that use that library item. | When you change the Dreamweaver Template, it updates all pages that use the template | Include files are done with scripting (Dreamweaver not required). The page includes CODE that points to a file and INCLUDES its code. |
| updating | After the update is made, you have to upload each page that uses the library | After the update is made, you have to upload each page that uses the template | After you change an include file, you only need to upload it. |
| comments | Dreamweaver only, client sided processing | Dreamweaver only, client sided processing | Server sided processing. Your server must support the technology. We will use PHP. |
| learning resources | learn how to create, insert, and modify a library (and update pages
that use the library):
|
learn how to create a template, define editable areas, apply and detach
a template, and change a template (and update pages that use that
template):
|
learn how to create an include file, insert the code that points to
the include file, and modify and upload an include file:
|
What to Do
- Create a folder for this project within the 213projects folder. Give it a name that makes sense to you and store all files for this project in this folder.
- Create a php files page1.php, page2.php, and page 3.php. For each page, add some text, a title, and a header. If you wish, you may use one of the Dreamweaver CSS layouts. Open page1.php and add navigation (link to each page and to 213portfolio.php).
- Move the navigation into an include file and include it on each page. Use Insert > Date to insert the modify date.
- Edit the library and include file to see how it updates on the pages.
- Open page1.php and add a footer.
- Convert the footer to a library item and add it to each page.
- Create a new file named template1.php. Add a header, main content, and a footer. This can be very simple (lorum ipsum content or use a CSS layout with content added).
- Save the page as a template and set the header and main content as editable regions.
- Create 2 more pages based on this template. Edit the content in each page.
- Add navigation to the template in a non-editable region, save, and see how this affects the pages that use the template.
Submitting work
- Add a link to this assignment from 213portfolio.php.
- Upload your files to the CIS 213 server. Don't forget to TEST YOUR WORK on the server!
- Submit your URL to Moodle.
Grading - 60 points
| Points | Requirements |
|---|---|
| 20 | Template |
| 20 | Library |
| 20 | Include file |
