Access Denied on contact.php

Permalink
Hi There,
On my custom theme I have header.php and footer.php inside folder called "elements" at the root of the theme. The header.php of course contain list of navigation menu that i manually created.
code examples...
<ul class="nav navbar-nav navbar-right">
            <li><a href="#top">Start</a></li>
            <li><a href="#about">About</a></li>
            <li><a href="#portfolio">Portfolio</a></li>
          </ul>


There are default.php at the root folder used as one pager theme. I wanted to create a separate page and name it "contact.php" which also sit at root folder. Inside contact.page the code i have included.
<?php 
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('elements/header.php'); ?>
<!-- Contact Form goes here -->
<?php  $this->inc('elements/footer.php'); ?>


also added menu list inside header.php
<li><a href="<?=$view->getThemePath()?>/contact.php">Contact</a></li>


I get "Access Denied" after click "contact" from the menu... What did I do wrong?

Your help is appreicated

 
APrather replied on at Permalink Reply
Hmm... Maybe my early post wasn't clear enough, perhaps confusing. I ll rephrase, I wonder is it possible for nav menu that i customize to recognize file called contact.php inside theme folder? I am getting access denied and could not figure out how to bypass it.

The nav menu
<li><a href="<?=$view->getThemePath()?>/contact.php">Contact</a></li>


The code inside custom.php
<?php 
defined('C5_EXECUTE') or die("Access Denied.");
$this->inc('elements/header.php'); ?>
<!-- Contact Form goes here -->
<?php this->inc('elements/footer.php'); ?>
Mnkras replied on at Permalink Reply
Mnkras
Thats not exactly how this works, you are most likely going to want to look at singlepages or using the external form block.
APrather replied on at Permalink Reply
care to elaborate this? any tips or examples on single page?
hawkagent replied on at Permalink Reply
APrather replied on at Permalink Reply
I believe I've mentioned earlier. My theme is going to be one pager except for contact page.. Just like thishttp://demo.tutorialzine.com/2010/02/html5-css3-website-template/te... (click on menu and see it).

In html way, I'd have to assign unique section id in href="" after <li> as well assigning classes order to create one page auto scrolling to certain section... Except for contact page which will go directly into other page. I'd be very much appreciated if could explain me how you would do it with what you have suggested? I am eager to learn this since there isn't really much of "customized c5 theme" document out there especially most of them are outdated.