8 if ( ! isset( $gravityview ) || empty( $gravityview->template ) ) {
9 gravityview()->log->error(
'{file} template loaded without context', array(
'file' => __FILE__ ) );
19 extract( $gravityview->template->extract_zone_vars( array(
'title',
'subtitle' ) ) );
20 extract( $gravityview->template->extract_zone_vars( array(
'image',
'description',
'content-attributes' ) ) );
21 extract( $gravityview->template->extract_zone_vars( array(
'footer-left',
'footer-right' ) ) );
25 ?><div
class=
"<?php gv_container_class( 'gv-list-container gv-list-single-container', true, $gravityview ); ?>">
29 <?php
if ( $has_title || $has_subtitle || $has_image || $has_description || $has_content_attributes || $has_footer_left || $has_footer_right ): ?>
30 <div
id=
"gv_list_<?php echo esc_attr( $entry_slug ); ?>" class=
"gv-list-view">
32 <?php
if ( $has_title || $has_subtitle ) { ?>
34 <div
class=
"gv-list-view-title">
40 if ( $did_main == 0 ) {
42 $extras = array(
'wpautop' =>
false,
'markup' =>
'<h3 class="{{ class }}">{{ label }}{{ value }}</h3>' );
44 $extras = array(
'wpautop' =>
true );
47 $extras[
'zone_id'] =
'single_list-title';
48 echo $gravityview->template->the_field(
$field, $extras );
51 if ( $has_subtitle ) {
52 ?><div
class=
"gv-list-view-subtitle"><?php
54 foreach ( $subtitle->all() as $i =>
$field ) {
56 if ( $did_main == 0 ) {
58 $extras = array(
'markup' =>
'<h4 id="{{ field_id }}" class="{{ class }}">{{ label }}{{ value }}</h4>' );
61 $extras[
'zone_id'] =
'single_list-subtitle';
62 echo $gravityview->template->the_field(
$field, $extras );
70 if ( $has_image || $has_description || $has_content_attributes ) {
72 <div
class=
"gv-list-view-content">
76 ?><div
class=
"gv-list-view-content-image gv-grid-col-1-3"><?php
78 echo $gravityview->template->the_field(
$field, array(
'zone_id' =>
'single_list-image' ) );
83 if ( $has_description ) {
84 ?><div
class=
"gv-list-view-content-description"><?php
85 $extras = array(
'label_tag' =>
'h4',
'wpautop' =>
true );
87 $extras = array(
'wpautop' =>
true,
'zone_id' =>
'single_list-description',
'label_markup' =>
'<h4>{{ label }}</h4>' );
88 echo $gravityview->template->the_field(
$field, $extras );
93 if ( $has_content_attributes ) {
94 ?><div
class=
"gv-list-view-content-attributes"><?php
95 $extras = array(
'label_tag' =>
'h4',
'wpautop' =>
true );
97 $extras = array(
'zone_id' =>
'single_list-content-attributes',
'markup' =>
'<p id="{{ field_id }}" class="{{ class }}">{{ label }}{{ value }}</p>' );
98 echo $gravityview->template->the_field(
$field, $extras );
110 if ( $has_footer_left || $has_footer_right ) {
113 <div
class=
"gv-grid gv-list-view-footer">
114 <div
class=
"gv-grid-col-1-2 gv-left">
116 foreach ( $footer_left->all() as $i =>
$field ) {
117 echo $gravityview->template->the_field(
$field, array(
'zone_id' =>
'single_list-footer-left' ) );
122 <div
class=
"gv-grid-col-1-2 gv-right">
124 foreach ( $footer_right->all() as $i =>
$field ) {
125 echo $gravityview->template->the_field(
$field, array(
'zone_id' =>
'directory_list-footer-right' ) );
if( $has_title|| $has_subtitle) if( $has_image|| $has_description|| $has_content_attributes) if( $has_footer_left|| $has_footer_right) endif
if( $add_query_args) $link
if(! isset( $gravityview)||empty( $gravityview->template)) $entry
Display a single entry when using a list template.
gravityview_back_link( $context=null)
Generate HTML for the back link from single entry view.
static pop()
Restores last saved state and context.
static push( $configuration)
Set the state depending on the provided configuration.
static get_entry_slug( $id_or_string, $entry=array())
Get the entry slug for the entry.
gravityview()
The main GravityView wrapper function.