About Links Page

This page is a one-stop shop for all the web pages at SERNLabs.

Keywords: XMLSimpleXMLPHP XMLLike+1TweetFacebookGoogle+Twitterintegration

The Code

This is a XML driven dynamic page. I use a simple XML document to store the list of pages on SERNLabs. This document goes like this:


To read the XMLs, I use PHP Simple XML.

$pages = array();
$pageList = simplexml_load_file('pageList.xml');

$pageNames = $pageList->page;

foreach($pageNames as $pageName){
    $pageUrl = "../includes/aboutpage/" . trim($pageName->AboutXml);
    $pages[] = new Page($pageUrl);

I have explained Simple XML in a little more detail on the About Page of SERNLabs' Photo Gallery. But I have used more features of PHP XML on the About Page itself. To see that go to the About Page of any About Page - if you understood what I just said.

I could easily have stored the page information in a MySQL database. In fact, I could end up doing that going forward. But XML was a good way to get this page off the ground quickly.

The Design

I started off with a radically different design for this page. That looked something like:

Links 1 Image

But half way through I decided that the layout was too distracting and drew attention away from the content. So I decided to use a more mellowed look. One that gave more prominence to the links - which after all, are what this page is about.

I have also included Social Media button links on this page for Facebook, Google+ and Twitter. Right now, I have hardly customized them, though I would like to that at some point. But all three provide good Tutorials and Code Generators to generate their respective links. You could read more about Adding Like button for Facebook, Adding +1 button for Google+ and Adding the Tweet button at the Developer sections of each site.

External Links

About Page