Skip to content

Instantly share code, notes, and snippets.

@Najaf
Created April 5, 2010 21:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Najaf/356913 to your computer and use it in GitHub Desktop.
Save Najaf/356913 to your computer and use it in GitHub Desktop.
<?php
//calling this with the above files (layout.php + page.php) in the working directory
render_page('page', array(
'title' => "About The Shakes",
'content' => "<p>Bringing the boys to the yard since 1976</p>"
));
//would then render this =>
?>
<!DOCTYPE html>
<html>
<head>
<link rel='stylesheet' type='text/css' href='style.css' media='screen' />
<script type='text/javascript' src='jquery.js'></script>
<title>Alis Fruity Milkshakes</title>
</head>
<body>
<div id='wrapper'>
<div id='header'>
<h1>Fruity Milkshakes For All</h1>
<h2 id='tagline'>The fruitiest milkshakes in town baby</h2>
</div>
<h3>About The Shakes</h3>
<div id='content'>
<p>Bringing the boys to the yard since 1976</p>
</div>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment