• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How do you include your pages ?

#1
[eluser]koskoz[/eluser]
Hi everybody,
I'd like to know how do you includes your pages with CI ?
Do you include header, next you've got your content and next your footer, or do you do it an other way ?

Because when I didn't use CI, I did like this :

Code:
HTML Stuff
<?php
$rep = array ("news", "roster", "wars", "contact", "downloads", "palmares", "teams");
            
if(isset($_GET["page"]) && file_exists($_GET["rub"]."/".$_GET["page"] .".php") && in_array ($_GET["rub"], $rep))
   {
       include dirname(__FILE__)."/".$_GET['rub']."/".$_GET['page'].".php";
   }
   else {
       include dirname(__FILE__)."/news/index.php";
        }
?>
HTML Stuff

And I think it's very usefull.


Messages In This Thread
How do you include your pages ? - by El Forum - 10-29-2008, 02:46 AM
How do you include your pages ? - by El Forum - 10-29-2008, 03:49 AM
How do you include your pages ? - by El Forum - 10-29-2008, 04:44 AM
How do you include your pages ? - by El Forum - 10-29-2008, 04:48 AM
How do you include your pages ? - by El Forum - 10-29-2008, 05:26 AM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.