Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Im stuck


  • Please log in to reply
No replies to this topic

#1 Delta16

Delta16

  • Members
  • 417 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:Malta
  • Local time:05:56 AM

Posted 18 April 2010 - 05:11 AM

Hi all, I am doing a website which will have a large amount of files uploaded to it which only the admin will upload files to it, users can't.

I split the template in parts, the banner in its own .php file, the navigation bar in its own and so on. ( including the body template on its own too.)

In the index (main page), with php I am including the other pages, so when I wish to edit the banner, I dont have to go on every page editing the same thing, but I will edit the banner from the banner.php only and the changes will be effected on all the pages.

Now for the body( where the content will be ) I cant use the same template ( with only one "main_panel.php" page) as the content will be different.

I have to duplicate the body template for each content and when I wish to edit the body template I have to go on every page to make a change to the body template.

My question is, how can I have only one main_panel.php(the body template) page as a template and the content will be on other different pages.

If you didnt understand well (which I guess you did as my english is not so good) dont hesitate to ask questions.

If you want to check other things, I have the site uploaded at www.elemen7s.com

Below is the index page and the body template.

index.php
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Elemen7s | Home</title>
<link href="template/CSS.css" rel="stylesheet" type="text/css" />
<style type="text/css">
<!--
body {
	margin-left: 0px;
	margin-top: 0px;
	margin-right: 0px;
	margin-bottom: 0px;
}
-->
</style>
</head>

<body>
<div class="Whole"> 

<?php include "template/login.php"; ?>

<?php include "template/banner.php"; ?>

<?php include "template/navigation_bar.php"; ?>

<div class="Body">

<?php include "template/left_panel.php"; ?>

<?php include "template/main_panel.php"; ?>

<?php include "template/right_panel.php"; ?>

</div>

</div>

<?php include "template/copyright.php"; ?>

</body>
</html>

main_panel.php ( the body template)
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<link href="template/CSS.css" rel="stylesheet" type="text/css" />
</head>

<body>
	<div class="Middle">
		<div id="Middle_Title"></div>
		<div id="Middle_Body" style="text-indent:5px"> 
			<!-- Here the content of the website will be -->

		</div>
		<div id="Middle_Bottom"></div>
	  </div>
</body>
</html>

Edited by Delta16, 18 April 2010 - 05:13 AM.


BC AdBot (Login to Remove)

 





0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users