Jump to content

Make a site run of 1 page.


sith717

Recommended Posts

There are many many many ways they're doing this. They could be using MVC and the action calls a controller (or something else if their implementation is different), they could be using a simple file include based upon the query string, etc. There's no real reason to do it unless it makes what you're doing easier.

 

If you meant how do you get the "blabla" it's contained in the $_GET array as $_GET['blabla'].

I used to build like that as it was easier to include the file needed as directed by the ?action=thePageName

 

But then I figured out a better way of building pages with 1 layout page and the rest are content pages as that was the ultimate goal. Most of my actual pages look like this....

 

<?php
          $page_title = 'Page Title';
          include($_SERVER['DOCUMENT_ROOT'].'/header.php');
?>

The content goes here

<?php
        footer();
?>

 

I use this method to create pages quickly. I make my layout page 1 time and determine a spot in the page where the content will actually change and then implement it using the above structure. If your interested in learning more about this, then I will get you the links to the numerous posts I have given in this board regarding it.

 

Nate

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.