Jump to content

Can't seem to call template from nav menu


ahughes3

Recommended Posts

I have created a module called "Vatspy.php" inside a folder called "Vatspy" the code of the file is below:

<?php
class Vatspy extends CodonModule  //Name can be any names.
{

    public function index()
    {
		    $this->render('vat-spy.php');
    }
}
?>

I have then created a template page called "vat-spy.php" which has the following code:

<!-- Flightboards Tables -->
 <h3 class="classic-title"><span>Flight Boards</span></h3>
<!-- Start Content -->
<div class="call-action call-action-boxed call-action-style2 no-descripton clearfix">
<div class="row blog-page">
 <!-- Start Blog Posts -->
 <div class="col-md-12 blog-box">
  <!-- Start Post -->
  <div class="blog-post image-post">
   <!-- Post Thumb -->   
		    <div class="post-head">
 <a class="lightbox" href="<?php echo SITE_URL; ?>/lib/skins/margo-full-width/images/tools/test1.jpg" title="This is an image title"><img alt="" src="<?php echo SITE_URL; ?>/lib/skins/margo-full-width/images/tools/test1.jpg" /> </a>
	   </div>
   <!-- Post Content -->   
   <div class="post-content">
 <h2>
  <a href="#">Image Box With Nice Lightbox</a></h2>
 <ul class="post-meta">
  <li>
   By <a href="#">iThemesLab</a></li>
  <li>
   December 30, 2013</li>
  <li>
   <a href="#">WordPress</a>, <a href="#">Graphic</a></li>
  <li>
   <a href="#">4 Comments</a></li>
 </ul>
 <p>
  Sed ut perspiciatis unde omnis iste natus error sit voluptatem accusantium doloremque laudantium, totam rem aperiam, eaque ipsa quae ab illo inventore veritatis et quasi architecto beatae vitae dicta sunt explicabo. Nemo enim ipsam voluptatem quia voluptas sit aspernatur aut odit aut fugit, sed quia consequuntur magni dolores eos qui ratione voluptatem sequi nesciunt.</p>
 <a class="main-button" href="#">Read More</a>
	    </div>
  </div>
  <!-- End Post --> 
 </div>
 <!-- End Blog Posts -->
</div>
</div>
<!-- End Content -->

I want to basically call the template as a page from the nav menu so I have set up a link on my navbar that looks like:

<li><a href="<?php echo url('/Vatspy.php'); ?>">Vatspy</a></li>

When I click on the link it then brings up the "VATSPY.PHP" module does not exist.

What I am trying to do is to create a page with details on Vatspy and just have it load as a page from the navbar. I do not want to create a page using the admin centre because as and when phpvms gets updated I will lose all those pages I'm assuming? Plus coding in the editor on phpvms is poor.

So can anyone spot my obvious mistake? Because I can't, but then that's not saying much! <_<

Link to comment
Share on other sites

If I create a module to go with a template, at the moment I am placing it in core/modules but I am conscious that if there is an update to phpvms these will be overwritten. If I create a module folder in my skins folder, would that work or does it not check in the same way as it does for skins?

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