refactorizar
This commit is contained in:
21
template-portada.php
Normal file
21
template-portada.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
/* Template Name: Plantilla de Portada */
|
||||
|
||||
use Timber\Timber;
|
||||
|
||||
$templates = [ 'templates/page-portada.twig' ];
|
||||
|
||||
$context = Timber::context(
|
||||
[
|
||||
'last_posts_opinion' => $site->getLastPostOpinion(),
|
||||
'posts_campana' => $site->getLastPostCampana(),
|
||||
'posts_conflicts' => $site->getLastPostConflicts(),
|
||||
'lasts_posts_news' => $site->getLastsPostsNews(),
|
||||
'botones_imagen' => $site->getBotonesEnlaces(),
|
||||
]
|
||||
);
|
||||
|
||||
//var_dump($context);
|
||||
error_log('✅ Template-portada');
|
||||
|
||||
Timber::render( $templates, $context );
|
||||
Reference in New Issue
Block a user