Posted by Jason Palmer on Wed, May 20, 2009 @ 03:25 PM
Customizing a Portal Site is a straightforward process and can offer you the ability to change the default look & feel of a site, or even increase the default functionality of a site.
How it all works

All sites follow a similar file structure. Looking at the example above, we see that the default Exhibit site contains a few PHP files and a templates folder.
Config.inc.php – Contains all site configurations.
Index.php – Responsible for initializing (bootstrapping) the Portal architecture.
Startup.php – Responsible for initializing (bootstrapping) the Portal architecture.
Inside the templates folder, we see a bunch of html/css/js files and a single php file local.inc.php. These are the files a web developer will modify to change the look & feel of a site and/or add their own functionality.
The first step in learning to develop for the Portal platform is understanding how Portal works and how a Portal site works. The diagram below demonstrates how Portal creates the screens you see when browsing a Portal Site.
Inside a template file
The templates folder contains several *.tmpl.html files. These are the front-end of the Portal Site and it’s where you can make layout and design changes. You may structure these files the same way you structure your HTML documents normally.
A typical layout file contains mostly standard HTML, however they also contain tags and tag domains.
From the Xinet Portal manual:
"A tag domain is a designated block of HTML within a template that has variable portions called tags. You can recognize a tag domain in WebNative Portal templates because a domain always begins with
and ends with ."
A tag domain contains several tags. Depending on the template (i.e. ImageInfo, Browse, etc), and the tag domain being used, certain tags will be available.
During the bootstrapping process the default values for each tag are set, however a PHP programmer has the ability to change these values using the local.inc.php file.
Customizing a Tag
Before making any PHP customizations, one should always investigate whether a change can be made to the config.inc.php file first to give the desired result.
Xinet’s templating system works with a few arrays of data in which tags are derived. These arrays store a variety of information about files, directories, volumes, keywords, etc. Referencing the diagram above, it becomes clear that the values in these arrays can be accessed and manipulated using the local.inc.php file.
For example, if I wanted to append to all files Comment attribute I would write a block of code like this in the local.inc.php file:

The above block of code would append “ – Copyright of my company” to the end of each files comment attribute.
Please reference the Xinet manual for a complete listing of PHP arrays.
Conclusion
Customizing a Portal Site is fairly simple and provides you with the ability to brand the interface and expand the functionality as you see fit, while still maintaining a powerful & secure asset management interface.