Viewing 5 posts - 1 through 5 (of 5 total)
  • Author
    Posts
  • lailuluelo Friend
    #204527

    Hello,

    I use JoomlArt Advanced Custom Module to show 4 articles in home. Each article has image asociated, system show this image minimized in home if is selected and when you click show this article with that image. Well, I want to use only that image minimized in home, but I don´t want to show that image in the article, I want to show only text. It’s possible?

    Thank you

    phong nam Friend
    #562569

    Hi there,

    Please give me your site to take a look.

    NOTE: If possible please give me a screenshot about your settings JA ACM.

    Thank you

    lailuluelo Friend
    #562598

    I just send you a PM @leo Burnetts

    Thanks

    phong nam Friend
    #562616

    I see your point now. By default, Hotel will load the Intro Image both from “homepage” and article view. In this case, we need to change the php code.

    Create a new file intro_full.php at ja/templates/ja_hotel/html/layouts/joomla/content/image then put

    <?php
    /**
    * @package Joomla.Site
    * @subpackage Layout
    *
    * @copyright Copyright (C) 2005 - 2014 Open Source Matters, Inc. All rights reserved.
    * @license GNU General Public License version 2 or later; see LICENSE.txt
    */

    defined('_JEXEC') or die;
    $item = is_array($displayData) ? $displayData['item'] : $displayData;
    $params = $item->params;
    $images = json_decode($item->images);
    //$images = json_decode($this->item->images);
    $imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext;

    $data = array();
    $data['item'] = $item;
    if (isset($images->image_fulltext) && !empty($images->image_fulltext)) {
    $data['image'] = $images->image_fulltext;
    $data['alt'] = $images->image_fulltext_alt;
    $data['caption'] = $images->image_fulltext_caption;
    }
    if (is_array($displayData) && isset($displayData['img-size'])) $data['size'] = $displayData['img-size'];

    ?>
    <?php if (isset($images->image_fulltext) && !empty($images->image_fulltext)) : ?>
    <div class="pull-<?php echo htmlspecialchars($imgfloat); ?> item-image" itemprop="image">
    <?php echo JLayoutHelper::render('joomla.content.image.image', $data); ?>
    </div>
    <?php endif ?>


    Next, open ja/templates/ja_hotel/html/layouts/joomla/content/item/default.php file then find line 57

    <?php echo JLayoutHelper::render('joomla.content.image.intro', $displayData); ?>

    change to

    <?php echo JLayoutHelper::render('joomla.content.image.intro_full', $displayData); ?>

    Now, the Intro Image will no longer appear on your article(only in homepage), if you want to add image back, just select the Full article image then select the image you want to display via Article.

    One more, by this way you dont need to add direct image via article using JCE :laugh:

    For e:g:

    If you add both Intro and Full article image via Images and Links option like this

    So, Intro will be used in “homepage” and Full image article will be used in “article page”

    and

    and now if you dont want to show image via “article page”, just clear the image link

    and here the result

    Hope that helps.


    1. 1
    2. 2
    3. 3
    4. 4
    5. result
    lailuluelo Friend
    #562618

    Thank you very much for your time, works perfect! 🙂

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

This topic contains 5 replies, has 2 voices, and was last updated by  lailuluelo 9 years, 8 months ago.

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