I have added the below code into item view using template override, and it works. <?php defined('_JEXEC') or die; if($this->item->params->get('itemImage') && !empty($this->item->image)) { // Prefetch Article Image $doc =...
Hello, I want to inject a prefetch image link into the header for webpage speed optimization. Eg: <link href="example.com/example.jpg" rel="prefetch" as="image" /> I have tried the below code into item view using template override:...
I want to force the K2 Content Module to load only the first single K2 articles, by using a template override.
Dear sir, I want to show item Extra Fields and item create date, under Latest Item From Author in the item view (template override). I tried the below code for loading a specific field but not working. <?php...
Thank you so much, Sir.
Hello, I am creating a slider powered by Bootstrap 4 and K2 Content Module. It's working fine but the below php code is adding class active into the last child. <?php echo ($key%2) ? "odd" : "even"; if(count($items)==$key+1) echo '...
Thank you so much, Fotis.
Hello, I want to show a PLAY ICON on K2 related items having any video. Here are the current codes: <?php if($this->item->params->get('itemRelatedMedia')): ?> <<==== PHP CONDITION FOR IF THIS K2 RELATED ITEM HAS ANY VIDEO OR NOT, IF YES,...
More