Logo of SermonSpeaker Extension Claim

Login Form

Adding sermon picture to sermon page

More
3 years 4 months ago #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
3 years 4 months ago #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.

Feel free to rate SermonSpeaker on JED .
Useful documentation for beginners: First Steps & FAQ
How to say "Thank You!": Contribute or support using the Donate button at the bottom of each page.

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

More
3 years 4 months ago #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.095 seconds
Powered by Kunena Forum