Keyword

Simple 'if elseif else' statement in custom item.php - HELP REQUIRED

  • AIS Web Team
  • AIS Web Team's Avatar Topic Author
  • Offline
  • New Member
More
3 years 7 months ago - 3 years 7 months ago #176842 by AIS Web Team
All sorted:

Working code:
    <?php if(!empty($this->item->extraFields->LeadVideo)): ?>
        <div class="hero-video">
            <div class="embed-responsive embed-responsive-16by9">
                <?php echo $this->item->extraFields->LeadVideo->value;?>
            </div>
        </div>
    
    <?php elseif(!empty($this->item->extraFields->HeaderImageurl)): ?>

    <div class="artist">
        <div class="hero picture" style="background: url(<?php echo $this->item->extraFields->HeaderImageurl->value; ?>)"></div>
    </div> 
    
     <?php else : ?>
    
    <div class="artist">
        <div class="hero picture" style="background: url(<?php echo $this->item->image; ?>)"></div>
    </div> 
    
    <?php endif; ?>
Last edit: 3 years 7 months ago by JoomlaWorks. Reason: Resolved

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

More
3 years 7 months ago #176857 by JoomlaWorks
Providing some context on what this change involved would also perhaps help others...

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