-
Notifications
You must be signed in to change notification settings - Fork 8
/
single-tb_outil.php
68 lines (53 loc) · 1.65 KB
/
single-tb_outil.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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<?php
/**
* Page Outil
*/
$fields = (object) get_fields( get_the_ID() );
// Si une redirection est définie, la suivre
if ( isset($fields->has_page) && $fields->has_page === false
&& isset($fields->redirect) ) {
wp_redirect( $fields->redirect['url'] );
exit;
}
get_header(); ?>
<div id="primary" class="content-area">
<main id="main" class="site-main" role="main">
<?php
if ( $fields->cover_buttons ) :
$fields->cover_buttons['display'] = 'seamless';
$cover_content = get_telabotanica_component( 'buttons', $fields->cover_buttons );
endif;
the_telabotanica_module('cover', [
'content' => $cover_content,
'modifiers' => 'tall'
]); ?>
<div class="layout-full-width">
<?php
// Si la page utilise des blocs
if( have_rows('blocks') ):
// On boucle sur les blocs
while ( have_rows('blocks') ) : the_row();
the_telabotanica_block(get_row_layout());
endwhile;
endif;
?>
</div>
<?php
// Si la page utilise des composants
if( have_rows('components') ) : ?>
<div class="layout-full-width background-beige">
<div class="layout-wrapper">
<div class="layout-components">
<?php
// On boucle sur les composants
while ( have_rows('components') ) : the_row();
the_telabotanica_component(get_row_layout());
endwhile;
?>
</div>
</div>
</div>
<?php endif; ?>
</main><!-- .site-main -->
</div><!-- .content-area -->
<?php get_footer(); ?>