Jump to content

Best way to make template for our website


pascal_22

Recommended Posts

Hello all!

 

I have a website with around 250 pages.

 

in every pages(login,index,search,contact....... and all others..) all are in this structure:

 

example:

index.php

 

<html>

<head><title></title>all others thing that goes here</head>

<body>

   <div><?php  include 'topmenu.php';   ?>   </div>

  <div><?php  include 'leftmenu.php';   ?>   </div>

   <div>//content of active page</div>

 

   <div><?php  include 'footer.php';   ?>   </div>

 

</body>

</html>

 

So here are only a short display but the important fact is.. on all main pages as:home,contact,member contact, members profile,... and such a lot more       all have there own tags (html,head,body......)

So whe n i change my design or other.. i have to pass all pages!!!!!

And i suppose isn't the best way.

 

What do you suggest to me!

 

thanks!

 

for exemple:

 

in  my index.php:

<?php

include 'header.php';//that will contents <html> and head tag.....

include 'leftmenu.php'//content menu and bddy tag......

//here the content of the page

 

include 'footer.php';//centent </body> and </html>

 

?>

 

is it that?

thanks

This is a good example of a full working PHP application using Smarty. Try to understand how to separate your presentation and logic.

Once you got the idea, you could jump over twig and try to create the same app using twig.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.