Also, you should know that for development I'm using exclusively NetBeans. The only other HTML editor I have access to is Microsoft Expression Web, but I don't like it very much. Dreamweaver is too expensive for me.
So, my main question is how to organize a website. Because I think right now both my work and personal websites are organized very oddly. Here is the body of index.php from my personal site:
Code: Select all
<body>
<div id="wrap">
<div id="header">
<h1>Yet Another Homepage</h1>
<h2>By (My Name)</h2>
</div>
<div id="menu">
<ul>
<li><a href="index.php" >Home</a></li>
<li><a onclick="changePageAndNav('Projects/main.php', 'Projects/projectsNav.php');">Projects</a></li>
<li><a onclick="changePageAndNav('About/main.php', 'About/aboutNav.php');">About Me</a></li>
</ul>
</div>
<div id="content">
<div class="right">
<?php
if ($_GET["page"] == null) {
include "Home/main.php";
} else {
include $_GET["page"];
}
?>
</div>
<div class="left">
<?php
if ($_GET["subNav"] != null) {
include $_GET["subNav"];
}?>
</div>
<div id="bottom">
<a onClick="toTop();">Back to Top</a>
</div>
</div>
<div id="footer">
<p>© (My Name), 2009</p>
</div>
</div>
</body>
Code: Select all
function changePageAndNav(page, subNav){
window.location = "?page=" + page + "&subNav=" + subNav;
}The plus side to doing things this way is consistent layout of the page, and very little duplicated code. And if I ever want to change the layout, I only need to change index.php.
On the negative side, I am left with large ugly url's that people can mess with. Such as:
Can anyone suggest a better way to organize the website?