Adding sermon picture to sermon page

More
13 Jun 2015 18:57 #5319 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;

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

More
13 Jun 2015 21:59 #5320 by Thomas Hunziker
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.

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

More
14 Jun 2015 01:55 #5321 by Bill Teague
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.164 seconds
Powered by Kunena Forum