-
Notifications
You must be signed in to change notification settings - Fork 3
/
archive-dadesobertes.php
35 lines (29 loc) · 1.29 KB
/
archive-dadesobertes.php
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
<?php
/**
* Archive page for esdeveniment custom post type
*
* Methods for TimberHelper can be found in the /lib sub-directory
*
* @package wp-softcatala
*/
//JS and Styles related to the page
/* Estils propis dades obertes */
wp_enqueue_style( 'sc-css-dades-obertes', get_template_directory_uri() . '/static/css/dades-obertes.css', array('sc-css-main'),WP_SOFTCATALA_VERSION );
//Template initialization
$templates = array('archive-dadesobertes.twig' );
$title = 'Dades Obertes - Softcatalà';
$description = 'Respositori de dades obertes';
$post = Timber::get_post();
//Context initialization
$context_filterer = new SC_ContextFilterer();
$context_overrides = array( 'title' => $title, 'description' => $description );
$context = $context_filterer->get_filtered_context( $context_overrides, false );
$context['content_title'] = 'Dades Obertes';
$context['sidebar_top'] = Timber::get_widgets('sidebar_top');
$context['sidebar_elements'] = array( 'static/suggeriment.twig', 'baixades.twig', 'links.twig' );
$context['sidebar_bottom'] = Timber::get_widgets('sidebar_bottom');
$context['posts'] = Softcatala\Providers\Dadesobertes::get();
$context['pagination'] = Timber::get_pagination();
$context['post'] = $post;
$context['share_title'] = $context['content_title'];
Timber::render( $templates, $context );