-
AuthorPosts
-
network211 Friend
network211
- Join date:
- February 2014
- Posts:
- 12
- Downloads:
- 5
- Uploads:
- 2
- Thanked:
- 1 times in 1 posts
February 5, 2014 at 7:59 pm #194507It appears that there is a bug in the HTML override for com_content/article. It relates to the display of intro and full images.
on line 165 it tests for the existence of full text images. If so, it displays the image in a span4 region.
<?php if (isset($images->image_fulltext) && !empty($images->image_fulltext)) : ?>
<?php
$imgfloat = (empty($images->float_fulltext)) ? $params->get('float_fulltext') : $images->float_fulltext;
?>
<div class="pull-<?php echo htmlspecialchars($imgfloat); ?> span4">
<div class="item-image">
<img
<?php if ($images->image_fulltext_caption): ?>
<?php echo 'class="caption"'.' title="' .htmlspecialchars($images->image_fulltext_caption) .'"'; ?>
<?php endif; ?>
src="<?php echo htmlspecialchars($images->image_fulltext); ?>" alt="<?php echo htmlspecialchars($images->image_fulltext_alt); ?>"/>
</div></div>
<?php endif; ?>
On line 187ff, it tests for the existence of Intro text images, and sets the article text region to span8, otherwise span12.
What that means is:
- If you leave the code as originally designed, if a full text image exists, it will display in a span4 and the article text will display in a span12, obviously a bootstrap error
- If an intro image exists, it will never be displayed, but will make the article text region a span8, leaving a blank column.
I corrected my code to
<section class="<?php echo (isset($images->image_fulltext) and !empty($images->image_fulltext))?"span8":"span12";?>">
<div class="article-content clearfix"><?php echo $this->item->text; ?></div>
</section>
so that full text images can be displayed.
However, this does not solve the problem of intro text images and what happens when you set the article to NOT display the intro text.
1 user says Thank You to network211 for this useful post
Saguaros ModeratorSaguaros
- Join date:
- September 2014
- Posts:
- 31405
- Downloads:
- 237
- Uploads:
- 471
- Thanks:
- 845
- Thanked:
- 5346 times in 4964 posts
February 6, 2014 at 8:15 am #521475Thank you so much for your report. And yes, it’s a bug of this template, we’ve fixed it and will update in the upcoming release.
<blockquote>However, this does not solve the problem of intro text images and what happens when you set the article to NOT display the intro text.</blockquote>
Could you provide more details of the issue here. I try not to use the intro image but the content text still display in span12. Also note that the intro image displays in category layout only, not in article details page.
-
AuthorPosts
This topic contains 2 replies, has 2 voices, and was last updated by Saguaros 10 years, 9 months ago.
We moved to new unified forum. Please post all new support queries in our New Forum