Jump to content

Creating a charts page


Alex

Recommended Posts

Hi, Im trying to create a seperate page where a pilot can click on a world map on hotspots for the airports so it brings up a page with all the charts for that airport.

Here is the process as i understand it.

Create a module "Charts"

<?php
class charts extends CodonModule
{

       public function index()
       {    
       Template::Show('charts.tpl');
       }
}

?>

I have created my charts.tpl which is in my skins folder

and obviously each airport needs its own template where i will display the chart links.

When i do this i get the module "charts" does not exists.error

Is there anything else i need to change.

I have checked the file exists in core/modules/charts and it is there.

Thanks in advance

Alex

Link to comment
Share on other sites

  • Administrators

Make sure you have the module file placed correctly -> core/modules/charts/charts.php

Class names in php are also very important. Make sure that the folder, file name and class name are all exactly the same, including capitalzation.

core/modules/Charts/charts.php with the class name Charts will not work in most cases

core/modules/Charts/Charts.php with class name as Charts is the accepted way to build classes within codon.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...