-
AuthorPosts
-
mrspidey Friend
mrspidey
- Join date:
- August 2014
- Posts:
- 5
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
September 22, 2014 at 6:19 am #201503I am looking to see if it is possible to get the the related news to show category images instead of no image (when an article doesn’t have one) so it doesn’t look all broken? Or even better, to show a random image from a folder or perhaps a similar solution? Thanks.
EDIT: Just attaching an image to display example when you have a combination of articles with and without images:
mrspidey Friendmrspidey
- Join date:
- August 2014
- Posts:
- 5
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
September 23, 2014 at 2:38 am #550442Can somebody help please?
Thanks.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 23, 2014 at 4:43 am #550460Greetings mrspidey,
Could you check your site URL again as I can’t access it? and send me link of page where I can see the related news you’re referring to, I don’t see this part in our demo site.
See you around…
mrspidey Friendmrspidey
- Join date:
- August 2014
- Posts:
- 5
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
September 23, 2014 at 5:15 am #550464Thank you. PM’d you.
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
September 23, 2014 at 7:42 am #550482You can open file: templatesja_magzhtmlcom_contentarticledefault_related_item.php
Change this:
[PHP]
<div class=”item-image images-content clearfix” itemprop=”thumbnailUrl”>
<?php if (!empty($intro_src)): ?>
<?php if ($link): ?>
<a class=”article-link” href=”<?php echo $link; ?>” title=”<?php echo $this->escape($this->ritem->title); ?>”>
<?php endif; ?>
<?php echo MagzHelper::icon($exinfo[‘type’]) ?>
<img title=”<?php echo htmlspecialchars($intro_title); ?>”
src=”<?php echo htmlspecialchars($intro_src); ?>”
alt=”<?php echo htmlspecialchars($intro_alt); ?>”/>
<?php if ($link): ?>
</a>
<?php endif; ?><?php endif; ?>
</div>
[/PHP]To:
[PHP]
<div class=”item-image images-content clearfix” itemprop=”thumbnailUrl”>
<?php if (!empty($intro_src)): ?>
<?php if ($link): ?>
<a class=”article-link” href=”<?php echo $link; ?>” title=”<?php echo $this->escape($this->ritem->title); ?>”>
<?php endif; ?>
<?php echo MagzHelper::icon($exinfo[‘type’]) ?>
<img title=”<?php echo htmlspecialchars($intro_title); ?>”
src=”<?php echo htmlspecialchars($intro_src); ?>”
alt=”<?php echo htmlspecialchars($intro_alt); ?>”/>
<?php if ($link): ?>
</a>
<?php endif; ?>
<?php else: ?>
<div><img src=”/path/to/your/desired/image/here” ></div>
<?php endif; ?>
</div>
[/PHP]1 user says Thank You to Saguaros for this useful post
mrspidey Friendmrspidey
- Join date:
- August 2014
- Posts:
- 5
- Downloads:
- 4
- Uploads:
- 1
- Thanks:
- 6
- Thanked:
- 1 times in 1 posts
September 24, 2014 at 2:42 am #550559<em>@Saguaros 446975 wrote:</em><blockquote>You can open file: templatesja_magzhtmlcom_contentarticledefault_related_item.php
Change this:
[PHP]
<div class=”item-image images-content clearfix” itemprop=”thumbnailUrl”>
<?php if (!empty($intro_src)): ?>
<?php if ($link): ?>
<a class=”article-link” href=”<?php echo $link; ?>” title=”<?php echo $this->escape($this->ritem->title); ?>”>
<?php endif; ?>
<?php echo MagzHelper::icon($exinfo[‘type’]) ?>
<img title=”<?php echo htmlspecialchars($intro_title); ?>”
src=”<?php echo htmlspecialchars($intro_src); ?>”
alt=”<?php echo htmlspecialchars($intro_alt); ?>”/>
<?php if ($link): ?>
</a>
<?php endif; ?><?php endif; ?>
</div>
[/PHP]To:
[PHP]
<div class=”item-image images-content clearfix” itemprop=”thumbnailUrl”>
<?php if (!empty($intro_src)): ?>
<?php if ($link): ?>
<a class=”article-link” href=”<?php echo $link; ?>” title=”<?php echo $this->escape($this->ritem->title); ?>”>
<?php endif; ?>
<?php echo MagzHelper::icon($exinfo[‘type’]) ?>
<img title=”<?php echo htmlspecialchars($intro_title); ?>”
src=”<?php echo htmlspecialchars($intro_src); ?>”
alt=”<?php echo htmlspecialchars($intro_alt); ?>”/>
<?php if ($link): ?>
</a>
<?php endif; ?>
<?php else: ?>
<div><img src=”/path/to/your/desired/image/here” ></div>
<?php endif; ?>
</div>
[/PHP]</blockquote>Yep that sorted it. Thank you.
AuthorPostsViewing 6 posts - 1 through 6 (of 6 total)This topic contains 6 replies, has 2 voices, and was last updated by mrspidey 10 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum
Related Articles to use Category image
Viewing 6 posts - 1 through 6 (of 6 total)