Shopping Cart (0)

Creating simple Modules in phpVMS

Adding new modules to phpVMS is pretty easy if you know how to do it.

In this quick tutorial you’ll learn how to create a new about us page for your website without using the admin center for page creation.

For this module we will create the following 2 files:
– AboutUs.php
– aboutus.tpl

Lets start with the module file (AboutUs.php).

Create a php file, name it AboutUs.php and add the following:
AboutUs.php:
[source language=’php’]render(‘aboutus.tpl’);
}
}[/source]

[AdSense-C]

With this finished we now create a second file called aboutus.tpl:

aboutus.tpl:
[note note_color=”#ffffee” radius=”0″]In the aboutus.tpl file you may add anything you want. Write down some information text about your airline for example.[/note]

 

That`s it! Now the only thing we need to do is to upload it to the correct directories. You need to put the AboutUs.php file inside a folder named “AboutUs” and upload it to the modules directory. The aboutus.tpl file goes directly into your templates folder. (Note that the module is case sensitive.):

[note note_color=”#ffffff” radius=”0″]- core
— modules
— AboutUs
—- AboutUs.php

– core
— templates
aboutus.tpl[/note]

 

[AdSense-C]

To finish this tutorial create a link in your navigation menu (by default core_navigation.tpl):

<a href="<?php echo url('/aboutus'); ?>" >About Us</a>

That was pretty easy, wasn`t it? If you have any questions please comment below.

 


Leave a Reply