forked from Rareloop/lumberjack
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage.php
More file actions
executable file
·31 lines (26 loc) · 777 Bytes
/
page.php
File metadata and controls
executable file
·31 lines (26 loc) · 777 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
<?php
/**
* The template for displaying all pages.
*
* This is the template that displays all pages by default.
* Please note that this is the WordPress construct of pages
* and that other 'pages' on your WordPress site will use a
* different template.
*/
namespace App;
use App\Http\Controllers\Controller;
use Rareloop\Lumberjack\Http\Responses\TimberResponse;
use Rareloop\Lumberjack\Page;
use Timber\Timber;
class PageController extends Controller
{
public function handle()
{
$context = Timber::get_context();
$page = new Page();
$context['post'] = $page;
$context['title'] = $page->title;
$context['content'] = $page->content;
return new TimberResponse('templates/generic-page.twig', $context);
}
}