-
AuthorPosts
-
lailuluelo Friend
lailuluelo
- Join date:
- May 2010
- Posts:
- 241
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 110
- Thanked:
- 21 times in 1 posts
March 10, 2015 at 5:07 pm #204527Hello,
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 Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
March 11, 2015 at 9:11 am #562569Hi 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
1 user says Thank You to phong nam for this useful post
lailuluelo Friendlailuluelo
- Join date:
- May 2010
- Posts:
- 241
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 110
- Thanked:
- 21 times in 1 posts
phong nam Friendphong nam
- Join date:
- May 2015
- Posts:
- 3779
- Downloads:
- 1
- Uploads:
- 587
- Thanks:
- 499
- Thanked:
- 974 times in 888 posts
March 11, 2015 at 11:20 am #562616I 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.
- lailuluelo Friend
lailuluelo
- Join date:
- May 2010
- Posts:
- 241
- Downloads:
- 7
- Uploads:
- 34
- Thanks:
- 110
- Thanked:
- 21 times in 1 posts
March 11, 2015 at 11:40 am #562618Thank you very much for your time, works perfect! 🙂
AuthorPostsViewing 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
Jump to forum
Customizing articles
Viewing 5 posts - 1 through 5 (of 5 total)