-
Notifications
You must be signed in to change notification settings - Fork 3
/
contacte.php
25 lines (22 loc) · 977 Bytes
/
contacte.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
<?php
/**
* Template Name: Contacte
*
* @package wp-softcatala
*/
wp_enqueue_script( 'sc-js-contacte', get_template_directory_uri() . '/static/js/contact_form.js', array('sc-js-main'), WP_SOFTCATALA_VERSION, true );
wp_localize_script( 'sc-js-contacte', 'scajax', array(
'ajax_url' => admin_url( 'admin-ajax.php' )
));
$context = Timber::get_context();
$timberPost = new TimberPost();
$context['sidebar_top'] = Timber::get_widgets('sidebar_top');
$context['sidebar_elements'] = array( 'static/dubte_forum.twig', 'baixades.twig', 'links.twig' );
$context['sidebar_bottom'] = Timber::get_widgets('sidebar_bottom');
$context['post'] = $timberPost;
$context['credits'] = $timberPost->get_field( 'credits' );
//Contact Form Data
$context['contact']['to_email'] = 'web@softcatala.org';
$context['contact']['nom_from'] = 'Web de Softcatalà';
$context['contact']['assumpte'] = 'Contacte des del formulari general';
Timber::render( array( 'contacte.twig' ), $context );