Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • mrspidey Friend
    #201503

    I 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:


    1. Screen-Shot-2014-09-22-at-2.29.14-pm
    mrspidey Friend
    #550442

    Can somebody help please?

    Thanks.

    Saguaros Moderator
    #550460

    Greetings 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 Friend
    #550464

    Thank you. PM’d you.

    Saguaros Moderator
    #550482

    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]

    mrspidey Friend
    #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.

Viewing 6 posts - 1 through 6 (of 6 total)

This topic contains 6 replies, has 2 voices, and was last updated by  mrspidey 10 years, 2 months ago.

We moved to new unified forum. Please post all new support queries in our New Forum