GravityView  2.17
The best, easiest way to display Gravity Forms entries on your website.
views/list.php
Go to the documentation of this file.
1 <?php
2 /**
3  * The list layout template
4  *
5  * @global \GV\Template_Context $gravityview
6  */
7 
8 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
9  gravityview()->log->error( '{file} template loaded without context', array( 'file' => __FILE__ ) );
10  return;
11 }
12 
13 ob_start();
14 
15 $gravityview->template->get_template_part( 'list/list', 'header' );
16 $gravityview->template->get_template_part( 'list/list', 'body' );
17 $gravityview->template->get_template_part( 'list/list', 'footer' );
18 
19 $content = ob_get_clean();
20 
21 /**
22  * @filter `gravityview/view/wrapper_container` Modify the wrapper container.
23  * @since 2.15
24  *
25  * @param string $wrapper_container Wrapper container HTML markup
26  * @param string $anchor_id (optional) Unique anchor ID to identify the view.
27  * @param \GV\View $view The View.
28  */
29 $wrapper_container = apply_filters(
30  'gravityview/view/wrapper_container',
31  '<div id="' . esc_attr( $gravityview->view->get_anchor_id() ) . '">{content}</div>',
32  $gravityview->view->get_anchor_id(),
33  $gravityview->view
34 );
35 
36 echo $wrapper_container ? str_replace( '{content}', $content, $wrapper_container ) : $content;
$wrapper_container
Definition: views/list.php:29
$content
Definition: views/list.php:19
gravityview()
The main GravityView wrapper function.