Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

A crisp, clean php template made by a designer

  • Loading branch information...
commit 2a16a64323ffd88715d59b0a3696e9f22b6bcd56 1 parent 5dec1f0
@nickcottrell authored
Showing with 17 additions and 0 deletions.
  1. +17 −0 README.markdown
17 README.markdown
@@ -0,0 +1,17 @@
+A crisp, clean php template made by a designer
+### Why?
+I made button down in an attempt to learn how to separate functionality from layout from content. I already knew some php (like, simple booleans, includes and variable) and I was familiar with frameworks like [Jekyll]: and enjoy its elegant simplicity.
+### The Controller
+*Thread* (or `_thread.textile`"`) is the basic controller and contains all of the functions that deliver modular elements as well as handle functionality (like the form handler script). The way it works is that *thread* is simply included in each file, variables that are defined get converted into global variables that are used in various functions.
+### Routing and File Structure
+The file structure is basic. Files are arranged just as they would be on a static site. My preference is to have directories that contain `index.php` files to create a cleaner URLs. Each file in the system contains a PHP header that defines variables pertaining to content and layout. The header also pulls in the *thread* (controller) and the header, footer and other modular elements are pulled in as function calls. Modules and includes are designated as .textiles to help separate them from the php files.
+### Views and Layouts
+Layouts are determined by a variable defined in the header of each page. The top and bottom of each layout exist in the `_layouts` in a directory that determines the name of the layout. `top.textile` and `bttm.textile` are each called from the `includes/header.textile` and `includes/footer.textile` respectively. These layout submodules separate the layouts from the header, footer and other includes in the `_includes` directory. The way, content, meta tags, links, and analytics information is kept clean and separate from the code that determines the layout.
Please sign in to comment.
Something went wrong with that request. Please try again.