Jump to content

Trying to open the fleet page


ahughes3

Recommended Posts

Hi Folks,

I'm hoping someone can lend a hand. I am trying to call up a page on our site using the php script to open it, however its not working. My knowledge of php isn't strong enough to understand what I'm missing.

The feet page file (html) in question is being stored in a fleet module folder, which I am then calling up using the script below. Everytime I try the script though I get an error saying "error module does not exist".

Any help would be much appreciated.


class Fleet extends CodonModule
{
public function index()
{

Template:Show('fleet_main.tpl');

}}

Link to comment
Share on other sites

  • Moderators

You need to create a folder called "Fleet" in core/module and inside that folder make a file called "Fleet.php" then open the fleet.php and paste the above code in there. Also, you need to place the "fleet_main.tpl" in you skin folder or in core/templates if you're using the default skin. Remember, the module folder and the file inside that are case sensitive. To create a link to call the module use the following code:

< a hre="<?php echo url('/fleet') ;?>">Fleet Page</a>

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...