ModPro Tutorial

This page shows examples of how to use ModPro.

Overview
Tutorial 1 - Referenced Modules
Tutorial 2 - Module Libraries
Tutorial 3 - Modules as Templates
Tutorial 4 - Custom Modules

Overview

This tutorial is designed to help you learn ModPro as quickly as possible. Each tutorial builds on the previous one, so make sure to look at them in order.

This page gives an overview of each tutorial. The source files for the examples are in the tutorial sub-directory of the ModPro directory. The tutorial source files contain more comments to help you understand what we did.

To build the pages of a tutorial go to the tutorial's directory and run the "make" command.

Tutorial 1 - Referenced Modules

This example is the most basic page that can be created with ModPro. It simply displays "Welcome to ModPro!" on the page. This example shows how to create and use referenced modules. Referenced modules are defined outside the element they're referenced from.

Tutorial 2 - Module Libraries

This example shows how to use modules defined in other files. Being able to define modules in other files allows you to build libraries of modules that can be used throughout your web site. For instance, if all of your pages use the same layout on every page you can put that definition into an include file. This makes it easier to make site-wide changes from one place.

Tutorial 3 - Modules as Templates

In this tutorial we take the example from the previous tutorial and turn it inside out to create a page template. This allows us to create a page layout that can be used by all pages in our web site. Content for individual pages is defined in each page's source file without having to duplicate page layout.

Tutorial 4 - Custom Modules

This example shows how to create and use custom modules written in XSL. A custom module is a module defined by an XSL template that provides some custom functionality. A custom module package, or ModPack, is a set of custom modules defined in an XML file. In this tutorial we create two pages and add a navigation bar to allow us to navigate from one page to the other.