Permalink
Browse files

Adjusted regexps and views

  • Loading branch information...
danielsaidi committed Mar 17, 2011
1 parent 283b180 commit 206997e7b9f2f5ad9677706d1be54cadb20080d4
Showing with 12 additions and 7 deletions.
  1. +4 −2 REMOVE_FILE_NAME.htaccess
  2. +5 −1 controllers/homeController.php
  3. +0 −1 views/home/index.php
  4. +3 −3 views/shared/master.php
@@ -5,6 +5,8 @@ RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
-RewriteRule ^([a-zA-Z0-9_\-]+)/?$ controllers/_controller.php?controller=home&action=$1 [NC]
+#TODO: As of now, the rewrite rules override any query strings that are added to the url. Solve this asap!
+
+RewriteRule ^([a-zA-Z0-9_\-]+)$ controllers/_controller.php?controller=$1&action=index [NC]
RewriteRule ^([a-zA-Z0-9_\-]+)/([a-zA-Z0-9_\-]+)$ controllers/_controller.php?controller=$1&action=$2 [NC]
-RewriteRule ^$ controllers/_controller.php?controller=home&action=index [NC]
+RewriteRule ^$ home/index [NC]
@@ -2,7 +2,11 @@
switch (Controller::action())
{
- default:
+ case "about":
+ View::addView("~/views/home/about.php");
+ break;
+
+ case "index":
View::addView("~/views/home/index.php");
break;
}
View
@@ -6,7 +6,6 @@
<div class="columns wide-left fc">
<div class="left">
<?php if (Wigbi::isStarted()) { ?>
- <?php View::addView("~/wigbi/pages/index-wigbi/cache-handler.php"); ?>
<?php View::addView("~/wigbi/pages/index-wigbi/ini-handler.php"); ?>
<p class="ingress large">More will follow... :)</p>
<?php } else { ?>
View
@@ -3,15 +3,15 @@
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" >
<head>
<?php print MasterPage::getContent("wigbi-start"); ?>
- <link rel="stylesheet" type="text/css" href="wigbi/bundle/css:wigbi/css" />
- <link rel="stylesheet" type="text/css" href="wigbi/bundle/css:wigbi/css/index-wigbi" />
+ <link rel="stylesheet" type="text/css" href="<?php pwurl("~/wigbi/bundle/css:wigbi/css") ?>" />
+ <link rel="stylesheet" type="text/css" href="<?php pwurl("~/wigbi/bundle/css:wigbi/css/index-wigbi") ?>" />
</head>
<body>
<div id="main">
<div id="main-header">
<div id="main-logo">
- <img src="wigbi/img/logo.png" alt="Wigbi logo" />
+ <img src="<?php pwurl("~/wigbi/img/logo.png") ?>" alt="Wigbi logo" />
</div>
</div>

0 comments on commit 206997e

Please sign in to comment.