test
Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • sobe Friend
    #201998

    There seems to be a problem with the blog layout when 1 Leading Article is selected followed by a few Intro Articles displayed with two columns. The first article works fine, but the 2nd article seems completely misaligned (somewhat similar to the 1st article, yet off to the side), and then the other articles appear in two columns properly.

    I just re-installed the quickstart template (J version 3.3) and chose to modify the “J! Blog” menu to have 1 Leading Article, 4 Intro Articles, and 2 Columns and the problem is easily replicable.

    How do I get the page to have simply 1 leading article, and then the rest in two columns?

    Saguaros Moderator
    #552703

    Hi sobe,

    You can try with my tweak here:

    – Open file: templatesja_fixelhtmlcom_contentcategoryblog.php
    – At approx line 80, you will see this snippet of code:


    <?php
    $key = ($key - $leadingcount) + 1;
    $rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
    $row = $counter / $this->columns;

    if ($rowcount == 1) : ?>
    <div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?> row-fluid">

    Replace it with:


    <?php
    $key = ($key - $leadingcount) + 1;
    $rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
    $row = $counter / $this->columns;

    if ($rowcount != 1) : ?>
    <div class="items-row cols-<?php echo (int) $this->columns;?> <?php echo 'row-'.$row; ?> row-fluid">

    Hope it helps.

    sobe Friend
    #552737

    Hi Saguaros,
    You’re tweak did resolve the second article issue, but it also created another problem. Now, for some reason the two column layout is skipping the third article and leaving an empty space where that article should be.

    Saguaros Moderator
    #552804

    You can PM me admin and ftp credentials of your site, I will take a look.

    sobe Friend
    #553136

    Hi Saguaros,
    Any progress in helping to resolve the issue?

    Thanks again for your help.

    Saguaros Moderator
    #553160

    Hi sobe,

    I replace this:


    <?php if (!empty($this->intro_items)) : ?>
    <?php foreach ($this->intro_items as $key => &$item) : ?>
    <?php
    $key = ($key - $leadingcount) + 1;
    $rowcount = (((int) $key - 1) % (int) $this->columns) + 1;
    $row = $counter / $this->columns;

    if ($rowcount == 1) : ?>

    With:


    <?php if (!empty($this->intro_items)) : ?>
    <?php foreach ($this->intro_items as $key => &$item) : ?>
    <?php $rowcount = ((int) $counter % (int) $this->columns) + 1; ?>
    <?php if ($rowcount == 1) : ?>
    <?php $row = $counter / $this->columns; ?>

    I also back up the old file so that you can see the difference.

    Have a nice day
    Saguaros

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

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

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