Skip to content

Instantly share code, notes, and snippets.

@jlebrech
Created February 16, 2012 10:37
Show Gist options
  • Save jlebrech/1843941 to your computer and use it in GitHub Desktop.
Save jlebrech/1843941 to your computer and use it in GitHub Desktop.
php like this
+-----------------------------------------------------+
| <----------------------+ Head
| Layout.php +-------------------------------+ |
| | Menu 1 <-----------+ Include each block separately
| +-----------+ +-------------------------------+ |
| | | | Menu 2 <-----------+ Wrap your includes with layout divs
| | Sidebar | +-------------------------------+ |
| | | |
| | | +-------------------------------+ |
| | | | <---------------------+ Include a main.php
| | | | Main | | The individual page code
| | | | | | goes here.
| | | | | |
| | | | | | Each page can also pass
| | | | | | Parameters to other
| | | | | | Content areas in the main
| | | | | | Layout
| | | | | |
| | <----|-------------------------------|----|-----+ I can then pass a current page
| | | | | | Parameter to sidebar
| | | | | |
| +-----------+ +-------------------------------+ |
| <--------------+ Foot
+-----------------------------------------------------+
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment