BMC/UUP-SITE - Web site/application rendering.

Screenshot of uup-site welcome page using default theme

This library takes a object oriented approach at building web sites by separating page layout from content. It supports multiple theme, rendering page direct or using a dispatcher (routing) script.

Site Layout:

Proposed site layout. All directory location are configurable in config/ that is used to initialize a page class instance.

      +-- htdocs/                       // Document root
      |     +-- theme/xyz/assets        // Static support files for theme xyz
      |                     +-- css/
      |                     +-- js/
      |                     +-- img/
      +-- template/                     // Page rendering templates (themes)
      +-- locale/                       // Support for locale (gettext)
      +-- vendor/                       // Composer packages, including uup-site
      +-- composer.json                 // Site project composer file
      +-- Makefile                      // Compile locales (PO-files).


Add repository URL to composer.json. Install uup-site pages using composer:

cd /var/www/
composer update

Make config protected copy of config/

cd vendor/bmc/uup-site/config
cp config/ config/

Open config/ and set default options. Use config/apache.conf to enable page routing.


All themes should at least provide the standard.ui template, but it's up to user to define any number of *.ui files as needed. See template/default for example on theme construction.

Download and install themes from the uup-site project page.


Using direct rendering:

        // Assume virtual host defines include path to root directory:

        use UUP\Site\Page\StandardPage;

        class IndexPage extends StandardPage
            // Define the printContent() member function at least.

        $page = new IndexPage();

Using page routing (pretty URL's):
        // The dispatcher.php (router) has already setup autoloading, no need
        // to explicit call render() either.
        class IndexPage extends StandardPage
            // Define the printContent() member function at least.

More examples is included in example directory in the source package.


Menus and publish information can either be defined by having custom files in the page directory or programmatically by redefining menu content in the page constructor.

The site config file has some influence on menu handling also.

Real world examples:

Some sites that are built on bmc/uup-site: