Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • network211 Friend
    #194507

    It 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.

    Saguaros Moderator
    #521475

    Thank 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.

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

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