- Posts: 24
- Thank you received: 0
Adding sermon picture to sermon page
- Bill Teague
- Topic Author
- Offline
- Junior Member
Less
More
13 Jun 2015 18:57 #5319
by Bill Teague
Adding sermon picture to sermon page was created by Bill Teague
I am trying to add the sermon picture to the sermon blog view. My php knowledge is limited. I tried to adapt code from the sermons blog layout in the extnewline view as follows below. Nothing shows up in the page. If I remove the if statement from the picture code, I get a broken image.
Suggestions?
<div class="ss-sermondetail-container">
<?php if ($picture = SermonspeakerHelperSermonspeaker::insertPicture($item)) : ?>
<div class="ss-sermondetail-label"><?php echo 'test' ?>:</div>
<div class="ss-sermondetail-text"><img src="<?php echo $picture; ?>"></div>
if (in_array('sermon:date', $this->columns) and ($this->item->sermon_date != '0000-00-00 00:00:00')) : ?>
<div class="ss-sermondetail-label"><?php echo JText::_('COM_SERMONSPEAKER_FIELD_DATE_LABEL'); ?>:</div>
<div class="ss-sermondetail-text">
<time datetime="<?php echo JHtml::_('date', $this->item->sermon_date, 'c'); ?>" itemprop="dateCreated">
<?php echo JHtml::Date($this->item->sermon_date, JText::_($this->params->get('date_format')), true); ?>
</time>
</div>
<?php endif;
Suggestions?
<div class="ss-sermondetail-container">
<?php if ($picture = SermonspeakerHelperSermonspeaker::insertPicture($item)) : ?>
<div class="ss-sermondetail-label"><?php echo 'test' ?>:</div>
<div class="ss-sermondetail-text"><img src="<?php echo $picture; ?>"></div>
if (in_array('sermon:date', $this->columns) and ($this->item->sermon_date != '0000-00-00 00:00:00')) : ?>
<div class="ss-sermondetail-label"><?php echo JText::_('COM_SERMONSPEAKER_FIELD_DATE_LABEL'); ?>:</div>
<div class="ss-sermondetail-text">
<time datetime="<?php echo JHtml::_('date', $this->item->sermon_date, 'c'); ?>" itemprop="dateCreated">
<?php echo JHtml::Date($this->item->sermon_date, JText::_($this->params->get('date_format')), true); ?>
</time>
</div>
<?php endif;
Please Log in or Create an account to join the conversation.
- Thomas Hunziker
- Offline
- Administrator
13 Jun 2015 21:59 #5320
by Thomas Hunziker
Replied by Thomas Hunziker on topic Adding sermon picture to sermon page
You want to show the picture in the sermon detailpage in the extnewline layout?
Take a look at the "content" layout: github.com/Bakual/SermonSpeaker/blob/mas...ontent.php#L157-L159
You can copy those three lines to your edited layout and adjust the HTML part as needed.
Take a look at the "content" layout: github.com/Bakual/SermonSpeaker/blob/mas...ontent.php#L157-L159
You can copy those three lines to your edited layout and adjust the HTML part as needed.
Please Log in or Create an account to join the conversation.
- Bill Teague
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 24
- Thank you received: 0
14 Jun 2015 01:55 #5321
by Bill Teague
Replied by Bill Teague on topic Adding sermon picture to sermon page
Thanks! Took some trial-and-error since I'm no pro, but I got what I needed.
Please Log in or Create an account to join the conversation.
Time to create page: 0.112 seconds