Keyword

What is php condition for if k2 related item has any video or not?

  • Dayyal Dg.
  • Dayyal Dg.'s Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #173494 by Dayyal Dg.
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, THEN SHOW THE BELOW PLAY ICON ======>>
<span class="card-related-media t"><img src="www.bioscience.com.pk/templates/bspk/images/system/video-play.svg">



<?php endif; ?>

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #173501 by JoomlaWorks
Use this:
<?php if($this->item->params->get('itemRelatedMedia') && !empty($item->video)): ?>
/* your code goes here */
<?php endif; ?>

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.

  • Dayyal Dg.
  • Dayyal Dg.'s Avatar Topic Author
  • Offline
  • New Member
More
4 years 5 months ago #173514 by Dayyal Dg.
Thank you so much, Fotis.

Please Log in or Create an account to join the conversation.

More
4 years 5 months ago #173518 by JoomlaWorks
You're welcome.

Fotis / JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

Please Log in or Create an account to join the conversation.


Powered by Kunena Forum