Last active
September 27, 2022 07:59
-
-
Save iamrobert/305d7ba33fcfe0fc4425d293e2244376 to your computer and use it in GitHub Desktop.
FLEXIContent item.php
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
FlexicontentFields::getFieldDisplay($item, "gallery"); | |
if(FlexicontentFields::getFieldDisplay($item, "gallery") != "") { | |
?> | |
<div class="gallery wow iamrobert" data-wow-delay="0.25s" data-wow-offset="-100"> | |
<div class="grid-container max1800"> | |
<div class="grid-x"> | |
<div class="cell"> | |
<div class="dw lightgallery"> | |
<?php | |
// GET URL | |
function url(){ | |
return sprintf( | |
"%s://%s", | |
isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] != 'off' ? 'https' : 'http', | |
$_SERVER['SERVER_NAME'] | |
); | |
} | |
$field_id = 232; | |
$fvals = $item->fieldvalues[$field_id]; | |
$lightGallery = $item->fields['gallery']; | |
$largePic = $lightGallery->thumbs_src['large']; | |
$mediumPic = $lightGallery->thumbs_src['medium']; | |
$smallPic = $lightGallery->thumbs_src['small']; | |
for ($i = 0; $i < count($largePic); $i++) : | |
$v = JArrayHelper::getValue($fvals, $i); | |
if ( @unserialize($v)!== false || $v=== 'b:0;' ) $v = unserialize($v); | |
?> | |
<div class="dw-panel"> | |
<div class="dw-panel__content"> | |
<?php | |
$dataSub = ''; | |
$dataSubTitle = ''; | |
$dataSubDesc = ''; | |
if($v['title'] !== '') { | |
$dataSubTitle = '<h4>'.$v['title'].'</h4>'; | |
} | |
if($v['title'] == '' && $v['alt'] !== '') { | |
$dataSubTitle = '<h4>'.$v['alt'].'</h4>'; | |
} | |
if($v['desc'] !== '') { | |
$dataSubDesc = '<p>'.nl2br($v['desc']).'</p>'; | |
} | |
if($v['title'] !== '' || $v['desc'] !== '') { | |
$dataSub = 'data-sub-html="'.$dataSubTitle.$dataSubDesc.'"'; | |
} | |
// $picl = url().$largePic[$i]; | |
// list($lsource_w, $lsource_h) = GetImageSize($picl); | |
echo'<a class="no-barba is-lightbox" data-responsive="'.url().$smallPic[$i].' 640, '.url().$mediumPic[$i].' 800" '.$dataSub.' href="'.url().$largePic[$i].'">'; | |
echo '<div class="link"><figure class="eff"><img src="'.url().$smallPic[$i].'" alt="'.$v['alt'].'" class="w100" /> <div class="figcaption"><p class="icon icon-magnify"></p></div></figure></div>'; | |
echo '</a>'; | |
?> | |
</div></div> | |
<?php endfor; ?> | |
</div></div></div></div> | |
</div> | |
<?php }; ?> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/** | |
* @version 1.5 stable $Id: item.php 1704 2013-08-04 08:23:12Z ggppdk $ | |
* @package Joomla | |
* @subpackage FLEXIcontent | |
* @copyright (C) 2009 Emmanuel Danan - www.vistamedia.fr | |
* @license GNU/GPL v2 | |
* | |
* FLEXIcontent is a derivative work of the excellent QuickFAQ component | |
* @copyright (C) 2008 Christoph Lukes | |
* see www.schlu.net for more information | |
* | |
* FLEXIcontent is distributed in the hope that it will be useful, | |
* but WITHOUT ANY WARRANTY; without even the implied warranty of | |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
* GNU General Public License for more details. | |
*/ | |
//html5 always | |
defined( '_JEXEC' )or die( 'Restricted access' ); | |
use Joomla\ String\ StringHelper; | |
/* + HEADING LOGIC | |
======================================================================*/ | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'common-code' . DS . 'item-header-logic.php' ); | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'common-code' . DS . 'global-logic.php' ); | |
// SHOW SPECS UNDER BANNER | |
$show_banner_specs = $this->params->get('show_banner_specs', 1); | |
/* | |
* ======================================================================= | |
+ GOOGLE PRODUCT STRUCTURED DATA IMAGES | |
* ======================================================================= | |
*/ | |
$json_images_html = ''; | |
$json_comma = ''; | |
$field_id = 232; | |
if(isset($this->item->fieldvalues[$this->item->fields['gallery']->id])) { | |
// Use in ITEM view / Category (multi-items) view | |
$fvals = isset($item->fieldvalues[$field_id]) ? $item->fieldvalues[$field_id] : array(); | |
$lightGallery = $item->fields['gallery']; | |
$largePic = $lightGallery->thumbs_src['large']; | |
$countSize = count($largePic) - 1; | |
for ($i = 0; $i < count($largePic); $i++) : | |
$v = JArrayHelper::getValue($fvals, $i); | |
if ( @unserialize($v)!== false || $v=== 'b:0;' ) $v = unserialize($v); | |
if ($countSize == $i) { | |
$json_images_html .= $json_gallery_images = '"'.$largePic[$i].'"'; | |
} else { | |
$json_images_html .= $json_gallery_images = '"'.$largePic[$i].'",'; | |
} | |
//echo rtrim($json_gallery_images,","); | |
//echo substr_replace($json_gallery_images, "", -1); | |
endfor; | |
if ($json_images_html != '') { | |
$json_comma = ','; | |
} | |
} | |
/* + GET BRAND | |
======================================================================*/ | |
$brand_name = $this->params->get('brand'); | |
if($brand_name != "") { | |
$brand_name = $brand_name; | |
} else { | |
$brand_name = $company_brand_name; | |
} | |
/* | |
* ======================================================================= | |
+ GET FIELDS | |
----------------------------------------------------------------------- | |
+ 1. SELECT the fields by their field_names | |
2. Explode the mulivariable fieldgroup | |
======================================================================= | |
*/ | |
//FIELD 1: | |
FlexicontentFields::getFieldDisplay( $item, 'seat_width', null, 'display', 'item' ); | |
$seat_width = $item->fields[ 'seat_width' ]->label; | |
//2 | |
FlexicontentFields::getFieldDisplay( $item, 'seat_depth', null, 'display', 'item' ); | |
$seat_depth = $item->fields[ 'seat_depth' ]->label; | |
//3 | |
FlexicontentFields::getFieldDisplay( $item, 'seat_height', null, 'display', 'item' ); | |
$seat_height = $item->fields[ 'seat_height' ]->label; | |
//4 | |
FlexicontentFields::getFieldDisplay( $item, 'backrest_height', null, 'display', 'item' ); | |
$backrest_height = $item->fields[ 'backrest_height' ]->label; | |
//5 | |
FlexicontentFields::getFieldDisplay( $item, 'armrest_height', null, 'display', 'item' ); | |
$armrest_height = $item->fields[ 'armrest_height' ]->label; | |
//6 | |
FlexicontentFields::getFieldDisplay( $item, 'footrest_ext_min_max', null, 'display', 'item' ); | |
$footrest_ext_min_max = $item->fields[ 'footrest_ext_min_max' ]->label; | |
//7 | |
FlexicontentFields::getFieldDisplay( $item, 'overall_length', null, 'display', 'item' ); | |
$overall_length = $item->fields[ 'overall_length' ]->label; | |
//8 | |
FlexicontentFields::getFieldDisplay( $item, 'overall_width', null, 'display', 'item' ); | |
$overall_width = $item->fields[ 'overall_width' ]->label; | |
//9 | |
FlexicontentFields::getFieldDisplay( $item, 'folded_width', null, 'display', 'item' ); | |
$folded_width = $item->fields[ 'folded_width' ]->label; | |
//10 | |
FlexicontentFields::getFieldDisplay( $item, 'overall_height', null, 'display', 'item' ); | |
$overall_height = $item->fields[ 'overall_height' ]->label; | |
//PRICE | |
FlexicontentFields::getFieldDisplay( $item, 'price', null, 'display', 'item' ); | |
$price = $item->fields[ 'price' ]->label; | |
/* | |
* ======================================================================= | |
+ PRODUCT FIELDS | |
----------------------------------------------------------------------- | |
$htmlspecs = Product Specs Table | |
$htmltable = Product .simple Table | |
$structured_data = Google Product Structured Data | |
* ======================================================================= | |
*/ | |
//REPEATABLE | |
$bws = FlexicontentFields::getFieldDisplay($item,'mwc_specs'); | |
//print_r($bws); die; | |
$bws_array1 = explode('[br]',$bws); | |
array_pop ( $bws_array1 ); | |
foreach($bws_array1 as $array){ | |
$bws_final[] = explode(";;",str_replace("amp;","",$array)); | |
//print_r($array); | |
} | |
//print_r($bws_array1); | |
$htmlspecs = ''; | |
$htmltable = ''; | |
$structured_data = ''; | |
if(isset($bws_final)){ | |
/* + HEADER | |
======================================================================*/ | |
$htmlspecs .= ' | |
<div class="light-gray-bkg"> | |
<div class="grid-container max1800 product-table"> | |
<div class="grid-x grid-margin-x grid-padding-x"> | |
<div class="cell"> | |
<table class="responsive hover"> | |
<tr class="no-hover"> | |
<th class="light-red">'.JText::_( 'TABLE_DIMS' ).'<br>(cm)</th>'; | |
$htmlspecs .= '<th><div class="w-01-seat-width w-dims"></div>'.$seat_width.'</th>'; | |
$htmlspecs .= '<th><div class="w-02-seat-length w-dims"></div>'.$seat_depth.'</th>'; | |
$htmlspecs .= '<th><div class="w-04-frontseat-height w-dims"></div>'.$seat_height.'</th>'; | |
$htmlspecs .= '<th><div class="w-03-backrest-height w-dims"></div>'.$backrest_height.'</th>'; | |
$htmlspecs .= '<th><div class="w-06-armrest-height w-dims"></div>'.$armrest_height.'</th>'; | |
$htmlspecs .= '<th><div class="w-05-footrest-extension w-dims"></div>'.$footrest_ext_min_max.'</th>'; | |
$htmlspecs .= '<th><div class="w-07-length w-dims"></div>'.$overall_length.'</th>'; | |
$htmlspecs .= '<th><div class="w-08-width w-dims"></div>'.$overall_width.'</th>'; | |
$htmlspecs .= '<th><div class="w-09-height w-dims"></div>'.$overall_height.'</th>'; | |
$htmlspecs .= '<th><div class="w-10-folding-height w-dims"></div>'.$folded_width.'</th>'; | |
$htmlspecs .= '</tr>'; | |
/* + ROWS | |
======================================================================*/ | |
$count = 0; | |
foreach($bws_final as $row){ | |
//print_r($row); | |
$htmlspecs .= '<tr>'; | |
//title; | |
$htmlspecs .= '<td>'.$row[0].'</td>'; | |
//seat_width | |
$htmlspecs .= '<td>'.$row[10].'</td>'; | |
$htmlspecs .= '<td>'.$row[11].'</td>'; | |
$htmlspecs .= '<td>'.$row[12].'</td>'; | |
$htmlspecs .= '<td>'.$row[13].'</td>'; | |
$htmlspecs .= '<td>'.$row[14].'</td>'; | |
$htmlspecs .= '<td>'.$row[15].'</td>'; | |
$htmlspecs .= '<td>'.$row[16].'</td>'; | |
$htmlspecs .= '<td>'.$row[17].'</td>'; | |
$htmlspecs .= '<td>'.$row[18].'</td>'; | |
$htmlspecs .= '<td>'.$row[19].'</td>'; | |
$htmlspecs .= '</tr>'; | |
$count++; | |
} | |
$htmlspecs .= '</table> | |
</div> | |
</div> | |
</div> | |
</div>'; | |
/* | |
* ======================================================================= | |
+ FLEXICONTENT SPECS | |
* ======================================================================= | |
*/ | |
$count2 = 0; | |
$htmltable .= ' <div class="grid-container max1800 mt-p"> | |
<div class="grid-x grid-padding-x grid-margin-x"> | |
<div class="cell"> | |
<h4 class="light-red">'.JText::_( 'PRODUCT_SPECS_HEADER' ).'</h4> | |
</div>'; | |
foreach($bws_final as $row){ | |
//print_r($row); | |
$rowc = count($bws_final); | |
if($rowc == 1 ) { | |
$htmltable .= '<div class="cell medium-6"><table class="simple">'; | |
} elseif($rowc == 2) { | |
$htmltable .= '<div class="cell medium-6"><table class="simple">'; | |
} elseif($rowc > 2) { | |
$htmltable .= '<div class="cell medium-auto"><table class="simple">'; | |
} | |
$kg = 'kg'; | |
if($rowc != 1 ) { | |
$htmltable .= '<thead><tr> | |
<th class="simpletitle h5" colspan="2">'.$row[0].'</th></tr></thead>'; | |
} | |
$htmltable .= '<tbody>'; | |
if($row[1]!="") { | |
$htmltable .= '<tr><td>'.$item->fields[ 'product_weight' ]->label.'</td><td>'.$row[1].$kg.'</td></tr>'; | |
}else{ | |
$htmltable .= '<tr><td>'.$item->fields[ 'product_weight' ]->label.'</td><td>-</td></tr>'; | |
} | |
if($row[2]!="") { | |
$htmltable .= '<tr><td>'.$item->fields[ 'max_load' ]->label.'</td><td>'.$row[2].$kg.'</td></tr>'; | |
}else{ | |
$htmltable .= '<tr><td>'.$item->fields[ 'max_load' ]->label.'</td><td>-</td></tr>'; | |
} | |
$htmltable .= '<tr><td>'.$item->fields[ 'front_wheel_specs' ]->label.'</td><td>'.$row[3].'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'rear_wheel_specs' ]->label.'</td><td>'.$row[4].'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'armrest' ]->label.'</td><td>'.str_replace('<br class="fcclear" />', ",",$row[5]).'</td></tr>'; | |
if($rowc == 1 ) { | |
$htmltable .= '</table></div><div class="cell medium-6"><table class="simple">'; | |
} | |
$htmltable .= '<tr><td>'.$item->fields[ 'footrest' ]->label.'</td><td>'.$row[6].'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'backrest' ]->label.'</td><td>'.$row[7].'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'brake_type' ]->label.'</td><td>'.str_replace('<br class="fcclear" />', ",",$row[8]).'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'companion_brake' ]->label.'</td><td>'.$row[9].'</td></tr>'; | |
$htmltable .= '<tr><td>'.$item->fields[ 'price' ]->label.'</td><td>'.$row[20].'</td></tr>'; | |
//print_r($item->fields[ 'product_weight' ]); | |
$htmltable .= '</tbody>'; | |
if($rowc == 1 ) { | |
$htmltable .= '</table></div>'; | |
} elseif($rowc == 2) { | |
$htmltable .= '</table></div>'; | |
} elseif($rowc > 2) { | |
$htmltable .= '</table></div>'; | |
} | |
$count2++; | |
} | |
$htmltable .= '</div></div>'; | |
/* | |
* ======================================================================= | |
+ JSON | |
* ======================================================================= | |
*/ | |
if(isset($this->item->fieldvalues[$this->item->fields['product_image']->id])) { | |
$productImage = 270; | |
if ( isset( $item->fieldvalues[ $productImage ] ) ) { | |
$productImage = $siteURL . $item->fields[ 'product_image' ]->{"display_large_src"}; | |
$document->setMetaData( 'twitter:image', "$productImage" ); | |
$document->setMetaData( 'og:image', "$productImage" ); | |
// $document->setMetaData( 'image', "$productImage", 'itemprop'); | |
} | |
$count3 = 0; | |
foreach($bws_final as $row){ | |
//print_r($row); | |
// | |
if($row[20] != "") { | |
$dollarAmount = preg_replace('/[^0-9]/', '', "$row[20]"); | |
$structured_data .= '<script type="application/ld+json"> | |
{ | |
"@context": "http://schema.org/", | |
"@type": "Product", | |
"name": '.json_encode($item->title.' '.$row[0], JSON_UNESCAPED_UNICODE).', | |
"image": [ | |
"'.$productImage.'"'.$json_comma.' | |
'.$json_images_html.' | |
], | |
"description": '.json_encode($json_description, JSON_UNESCAPED_UNICODE).', | |
"brand": { | |
"@type": "Thing", | |
"name": '.json_encode($brand_name, JSON_UNESCAPED_UNICODE).' | |
}, | |
"offers": { | |
"@type": "Offer", | |
"priceCurrency": "TWD", | |
"price": "'.$dollarAmount.'", | |
"url": "'.$current_page_url.'", | |
"itemCondition": "https://schema.org/NewCondition", | |
"availability": "https://schema.org/InStock", | |
"seller": { | |
"@type": "Organization", | |
"name": '.json_encode($company_brand_name, JSON_UNESCAPED_UNICODE).' | |
} | |
} | |
} | |
</script>'; | |
} | |
$count3++; | |
} | |
} | |
//$document->addCustomTag($structured_data); | |
} | |
echo '<div id="first" data-magellan-target="first">'; | |
echo '</div>'; | |
?> | |
<div class="flexicontent <?php echo $page_classes; ?>"> | |
<?php | |
/* | |
* ======================================================================= | |
+ KEY DETAILS | |
----------------------------------------------------------------------- | |
+ PRICE | |
+ MAX LOAD | |
* ======================================================================= | |
*/ | |
/* + PRICE | |
======================================================================*/ | |
$price_id = 250; | |
$price = ''; | |
if (!empty($item->fieldvalues[$price_id])) { | |
$highest_price = max( $item->fieldvalues[$price_id] ); | |
$lowest_price = min( $item->fieldvalues[$price_id] ); | |
if($highest_price == $lowest_price) { | |
$price = 'NT$'.number_format($highest_price); | |
} elseif ($highest_price != $lowest_price) { | |
$price = 'NT$'.number_format($lowest_price).'-'.number_format($highest_price); | |
} | |
} | |
/* + MAX LOAD | |
======================================================================*/ | |
$load_id = 242; | |
$load = ''; | |
if (!empty($item->fieldvalues[$load_id])) { | |
$highest_load = max( $item->fieldvalues[$load_id] ); | |
$lowest_load = min( $item->fieldvalues[$load_id] ); | |
$load = ''; | |
if($highest_load == $lowest_load) { | |
$load = $highest_load.'kg'; | |
} elseif ($highest_load != $lowest_load) { | |
$load = $lowest_load.'-'.$highest_load.'kg'; | |
} | |
} | |
/* + PRODUCT WEIGHT | |
======================================================================*/ | |
$prod_weight_id = 241; | |
$prod_weight = ''; | |
if (!empty($item->fieldvalues[$prod_weight_id ])) { | |
$highest_prod_weight = max( $item->fieldvalues[$prod_weight_id] ); | |
$lowest_prod_weight = min( $item->fieldvalues[$prod_weight_id] ); | |
if($highest_prod_weight == $lowest_prod_weight) { | |
$prod_weight = $highest_prod_weight.'kg'; | |
} elseif ($highest_prod_weight != $lowest_prod_weight) { | |
$prod_weight = $lowest_prod_weight.'-'.$highest_prod_weight.'kg'; | |
} | |
} | |
/* + PRODUCT WEIGHT | |
======================================================================*/ | |
$seat_width_id = 254; | |
$seat_width = ''; | |
if (!empty($item->fieldvalues[$seat_width_id ])) { | |
$highest_seat_width = max( $item->fieldvalues[$seat_width_id] ); | |
$lowest_seat_width = min( $item->fieldvalues[$seat_width_id] ); | |
if($highest_seat_width == $lowest_seat_width) { | |
$seat_width = $highest_seat_width.'cm'; | |
} elseif ($highest_seat_width != $lowest_seat_width) { | |
$seat_width = $lowest_seat_width.'-'.$highest_seat_width.'cm'; | |
} | |
} | |
?> | |
<?php | |
$specs = ''; | |
if($show_banner_specs == 1) { | |
$specs .= ' | |
<div class="grid-container max1800 prod-banner-details wow iamrobert"> | |
<div class="grid-x grid-padding-x grid-margin-x"> | |
<div class="cell">'; | |
$specs .= '<p>'.JText::_( 'PRODUCT_KEY_DETAILS' ).':</p>'; | |
$specs .= '</div> | |
</div>'; | |
$specs .= '<div class="grid-x grid-padding-x grid-margin-x align-middle main-specs">'; | |
if ($price != ''): | |
$specs .= '<div class="cell small-6 medium-shrink large-auto"> | |
<span>'.JText::_( 'PRODUCT_PRICE' ).':</span>'.$price. | |
'</div>'; | |
endif; | |
if ($load != ''): | |
$specs .= '<div class="cell small-6 medium-shrink large-auto"> | |
<span>'.JText::_( 'MAX_LOAD' ).':</span>'.$load. | |
'</div>'; | |
endif; | |
if ($prod_weight != ''): | |
$specs .= '<div class="cell small-6 medium-shrink large-auto"> | |
<span>'.JText::_( 'PRODUCT_WEIGHT' ).':</span>'.$prod_weight. | |
'</div>'; | |
endif; | |
if ($seat_width != ''): | |
$specs .= '<div class="cell small-6 medium-shrink large-auto"> | |
<span>'.JText::_( 'SEAT_WIDTH' ).':</span>'.$seat_width. | |
'</div>'; | |
endif; | |
$specs .= ' </div> | |
</div>'; | |
} | |
if($showBanner == 1): | |
echo $specs; | |
endif; | |
?> | |
<article class="mainbody" id="sticky-contain"> | |
<?php | |
$GLOBALS['variable'] = 'dasjasdkj'; | |
function name() | |
{ | |
echo $GLOBALS['variable']; | |
} | |
?> | |
<?php | |
if($showBanner == 0): | |
$header_shown = $this->params->get( 'show_title', 1 ) || $item->event->afterDisplayTitle || isset( $item->positions[ 'subheading' ] ); | |
if ( $header_shown ): ?> | |
<div class="wow iamrobert" data-wow-delay="0.25s"> | |
<div class="grid-container"> | |
<div class="grid-x grid-margin-x grid-padding-x"> | |
<div class="cell"> | |
<div class="title"> | |
<h1> | |
<?php if ($this->params->get('show_page_heading', 1)): ?> | |
<?php echo $this->params->get('page_heading'); ?> | |
<?php endif; ?> | |
<?php if ($this->params->get('show_title', 1)): ?> | |
<?php echo (mb_strlen($item->title, 'utf-8') > $this->params->get('title_cut_text', 200)) ? mb_substr($item->title, 0, $this->params->get('title_cut_text', 200), 'utf-8') . '...' : $item->title; ?> | |
<?php endif; ?></h1> | |
<?php if (isset($item->positions['subtitle'])): ?> | |
<h2> | |
<?php if (isset($item->positions['subtitle'])): ?> | |
<?php foreach ($item->positions['subtitle'] as $field): ?> | |
<?php echo $field->display; ?> | |
<?php endforeach; ?> | |
<?php endif; ?> | |
</h2> | |
<?php endif; ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php | |
endif; | |
echo '<div class="no-banner-header">'.$specs.'</div>'; | |
endif; | |
?> | |
<?php /*?> MAGELLAN NAV | |
<?php */?> | |
<!-- <div class="cell small-12" data-anchor="sticky-contain" data-sticky-container="" id="mag-bar">--> | |
<div class="cell small-12" id="mag-bar"> | |
<nav class="columns sticky style" data-active-class="active" data-anchor="sticky-contain" data-check-every="50" data-margin-top="0" data-sticky="" data-sticky-on="small"> | |
<div class="wow iamrobert nav-bar" data-wow-delay="0.85s" data-wow-offset="-100"> | |
<div class="grid-container fluid no-padding-right"> | |
<div class="grid-x grid-margin-x grid-padding-x align-stretch sm-reduce-padding"> | |
<div class="cell auto align-self-middle no-padding-right"> | |
<ul class="horizontal menu" data-magellan="" id="magellan"> | |
<?php if (isset($item->positions['description']) or (isset($item->positions['visual_editor']))) : ?> | |
<li> | |
<a href="#sect-0"> | |
<?php echo JText::_( 'PRODUCT_FEATURES' ); ?> | |
</a> | |
</li> | |
<?php endif; ?> | |
<li> | |
<a href="#sect-1"> | |
<?php echo JText::_( 'PRODUCT_SPECS' ); ?> | |
</a> | |
</li> | |
<?php | |
FlexicontentFields::getFieldDisplay($item, "gallery"); | |
if(FlexicontentFields::getFieldDisplay($item, "gallery") != "") { | |
?> | |
<li> | |
<a href="#sect-2"> | |
<?php echo JText::_( 'PRODUCT_GALLERY' ); ?> | |
</a> | |
</li> | |
<?php }; ?> | |
<?php if(isset($this->item->fieldvalues[$this->item->fields['file-download']->id])) :?> | |
<li> | |
<a href="#sect-4"><span class="show-for-small-only"><?php echo JText::_( 'PRODUCT_DOWNLOAD_TITLE_SMALL' ); ?></span> <span class="show-for-medium"><?php echo JText::_( 'PRODUCT_DOWNLOAD_TITLE_MEDIUM' ); ?></span></a> | |
</li> | |
<?php endif; ?> | |
<li class="merits-svg show-for-medium"> | |
<div class="grid-x align-middle"> | |
<div class="cell shrink"> | |
<div class="merits-symbol merits-symbol-dims"></div> | |
</div> | |
<div class="cell shrink"><a class="button no-margin-bottom" href="<?php echo JURI::base();?>dealers"><?php echo JText::_( 'DEALERS_MENU' ); ?></a> | |
</div> | |
</div> | |
</li> | |
</ul> | |
</div> | |
</div> | |
</div> | |
</div> | |
</nav> | |
</div> | |
<?php | |
if($showBanner == 1): | |
$header_shown = $this->params->get( 'show_title', 1 ) || $item->event->afterDisplayTitle || isset( $item->positions[ 'subheading' ] ); | |
if ( $header_shown ): ?> | |
<div class="wow iamrobert" data-wow-delay="0.25s"> | |
<div class="grid-container"> | |
<div class="grid-x grid-margin-x grid-padding-x"> | |
<div class="cell"> | |
<div class="title"> | |
<h1> | |
<?php if ($this->params->get('show_page_heading', 1)): ?> | |
<?php echo $this->params->get('page_heading'); ?> | |
<?php endif; ?> | |
<?php if ($this->params->get('show_title', 1)): ?> | |
<?php echo (mb_strlen($item->title, 'utf-8') > $this->params->get('title_cut_text', 200)) ? mb_substr($item->title, 0, $this->params->get('title_cut_text', 200), 'utf-8') . '...' : $item->title; ?> | |
<?php endif; ?></h1> | |
<?php if (isset($item->positions['subtitle'])): ?> | |
<h2> | |
<?php if (isset($item->positions['subtitle'])): ?> | |
<?php foreach ($item->positions['subtitle'] as $field): ?> | |
<?php echo $field->display; ?> | |
<?php endforeach; ?> | |
<?php endif; ?> | |
</h2> | |
<?php endif; ?> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
<?php | |
endif; | |
endif; | |
?> | |
<!--end mainbody --> | |
<div id="docs"> | |
<div class="sections"> | |
<?php | |
/* | |
* ======================================================================= | |
+ DESCRIPTION SECTION (includes page title) | |
* ======================================================================= | |
*/ | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'products' . DS . 'item-main-product-body.php' ); | |
/* | |
* ======================================================================= | |
+ PRODUCT SPECS (includes page title) | |
* ======================================================================= | |
*/ | |
?> | |
<!--SECTION 1--> | |
<section class="clearfix" data-magellan-target="sect-1" id="sect-1"> | |
<div class="wow iamrobert" data-wow-delay="1s" data-wow-offset="-100"> | |
<!--SECTION HEADING--> | |
<div class="grid-container max1800"> | |
<div class="grid-x grid-margin-x grid-padding-x"> | |
<div class="cell"> | |
<header class="titlex"> | |
<h2 class="h1"> | |
<?php echo JText::_( 'PRODUCT_SPECS' ); ?> | |
</h2> | |
</header> | |
</div> | |
</div> | |
</div> | |
<!-- /SECTION HEADING--> | |
<hr class="full-width no-margin-top no-margin-bottom"> | |
<?php | |
/* | |
* ======================================================================= | |
+ PRODUCT TABLES | |
* ======================================================================= | |
*/ | |
echo $htmlspecs; | |
echo $htmltable; | |
?> | |
<!-- /SECTION CONTENT END--> | |
</div> | |
</section> | |
<!--SECTION 1--> | |
<?php | |
/* | |
* ======================================================================= | |
+ GALLERY SECTION | |
* ======================================================================= | |
*/ | |
FlexicontentFields::getFieldDisplay($item, "gallery"); | |
if(FlexicontentFields::getFieldDisplay($item, "gallery") != "") { | |
?> | |
<section id="sect-2" class="clearfix" data-magellan-target="sect-2"> | |
<div class="wow iamrobert" data-wow-delay="0.65s" data-wow-offset="-100"> | |
<!--SECTION HEADING--> | |
<div class="grid-container max1800"> | |
<div class="grid-x grid-margin-x grid-padding-x"> | |
<div class="cell"> | |
<header class="titlex"> | |
<h2 class="h1"> | |
<?php echo JText::_( 'PRODUCT_GALLERY' ); ?> | |
</h2> | |
</header> | |
</div> | |
</div> | |
</div> | |
<!-- /SECTION HEADING--> | |
<hr class="full-width no-margin-top no-margin-bottom"> | |
<?php | |
// GALLERY BLOCK | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'common-code' . DS . 'item-gallery.php' ); | |
?> | |
</div> | |
</section> | |
<?php }; ?> | |
<?php | |
/* | |
* ======================================================================= | |
+ DOWNLOADS SECTION | |
* ======================================================================= | |
*/ | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'products' . DS . 'item-product-download.php' ); | |
?> | |
</div> | |
</div> | |
</article> | |
<?php if ($this->params->get( 'show_social_sharing', 1 )) : ?> | |
<?php | |
require_once( JPATH_SITE . DS . 'components' . DS . 'com_flexicontent' . DS . 'templates' . DS . 'iamrobert' . DS . 'social-sharing.php' ); | |
?> | |
<?php endif; ?> | |
</div> | |
<?php | |
/* | |
* ======================================================================= | |
+ GOOGLE STRUCTURED DATA | |
* ======================================================================= | |
*/ | |
echo $structured_data; ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment