| Current Path : /home/cbequiperp/www/plugins/flexicontent_fields/image/tmpl/ |
| Current File : /home/cbequiperp/www/plugins/flexicontent_fields/image/tmpl/value_link_to_item.php |
<?php // *** DO NOT EDIT THIS FILE, CREATE A COPY !!
/**
* Link to item layout (typically useful in multi-item views)
*
* This layout does not support inline_info, pretext, posttext
*/
// ***
// *** Values loop
// ***
$i = -1;
foreach ($values as $n => $value)
{
// Include common layout code for preparing values, but you may copy here to customize
$result = include( JPATH_ROOT . '/plugins/flexicontent_fields/image/tmpl_common/prepare_value_display.php' );
if ($result === _FC_CONTINUE_) continue;
if ($result === _FC_BREAK_) break;
// Create link to current item
$item_link = JRoute::_(FlexicontentHelperRoute::getItemRoute($item->slug, $item->categoryslug, 0, $item));
// Create HTML linking to current item
$field->{$prop}[] =
'<span style="display: inline-block; text-align:center; ">
<a href="'.$item_link.'" style="display: inline-block;">
'.$img_nolegend.'
</a><br/>'
.($_method == 'display_single_total' || $_method == 'display_single_total_link' ? '
<span class="fc_img_total_data badge bg-info badge-info" style="display: inline-block;" >
'.count($values).' '.JText::_('FLEXI_IMAGES').'
</span>' : '').'
</span>';
// If single display and not in field group then do not add more images
if (!$is_ingroup && $isSingle)
{
break;
}
}
// ***
// *** Add per field custom JS
// ***
if ( !isset(static::$js_added[$field->id][__FILE__]) )
{
$js = '';
if ($js) JFactory::getDocument()->addScriptDeclaration($js);
static::$js_added[$field->id][__FILE__] = true;
}
/**
* Include common layout code before finalize values
*/
$result = include( JPATH_ROOT . '/plugins/flexicontent_fields/image/tmpl_common/before_values_finalize.php' );
if ($result !== _FC_RETURN_)
{
// ***
// *** Add container HTML (if required by current layout) and add value separator (if supported by current layout), then finally apply open/close tags
// ***
// Add value separator
$field->{$prop} = implode($separatorf, $field->{$prop});
// Apply open/close tags
$field->{$prop} = $opentag . $field->{$prop} . $closetag;
}