forked from CoderDojo/cd-theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpage-resources.php
More file actions
36 lines (32 loc) · 2.08 KB
/
page-resources.php
File metadata and controls
36 lines (32 loc) · 2.08 KB
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
32
33
34
35
36
<?php
$context = Timber::get_context();
$post = new TimberPost();
$context['post'] = $post;
$context['broken_content'] = explode("<!--more-->", $post->content);
$context['grid'] = [ ['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc',
'link'=>'http://coderdojo.org','target'=>'_blank'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self'],
['src'=>'http://placehold.it/350x150', 'alt'=>'Alt desc 2',
'link'=>'http://coderdojo.org', 'target'=>'_self']
];
$context['gridtitle'] = "Categories";
Timber::render('page-resources.twig', $context);