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!

 

Link to comment
Share on other sites

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

Link to comment
Share on other sites

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.

Edited by jazzman1
Link to comment
Share on other sites

This thread is more than a year old. Are you sure you have something important to add to it?

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.

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