Product Updates
Joomla 5.2.2 Compatibility for JA Templates, Bug Fixes, and More

Hello team,

We have an issue with the sidebar position on our Joomla 4 website.

We copied the already existing code for the sidebar position and added it below the top2 position, so we have and second sidebar position.
SS_1:
SS_2:
SS_3:

But we see that the following positions: mainbody_top2, mainbody2, and mainbody_bottom2 are called within the articles, with the result that the content appears twice.
SS_4:

I also tried to create a new position (top 4) instead of mainbody. The article did not appear twice but it created a big gap for me.
SS_5:

Why is the second sidebar also called in the articles? How can I fix this so it only appears on the Home Page and doesn't affect the articles?

Thank you in advance,

    avopolis Hi

    I don't see the top2 section on homepage of your site now, did you remove it?

    And share the super admin account + tell me the file you changed so I can take a look.

    Hello Saguaros,

    I have updated the field with the account details.

    We haven't removed the top2 section, we just haven't used it in any module.

    You can also find the modified file here: /templates/gk_spotlight/layouts/default.php

    Thank you for your help,

    Could you share screenshots of how you want to achieve? as I can see that you duplicated the whole section of main body content now.

    Hello Saguaros,

    I want to have a second sidebar on the site, as it is now:

    Yes, I have duplicated the whole section of the main body, because I didn't find another way to add a second sidebar.

    Can I remove these positions (SS below) from the article page, so we don't have duplicate content and keep only the default positions?

    Is there another way to create a new sidebar just for the Home page, without affecting the structure of the articles?

    Thank you,

    The homepage of this template has specific style for the header so it can stay sticky on left side and there is no sidebar on homepage. You can create an additional module position and add style for it so it can display on the right side. Below is my tweak:

    1/ Create a new position sidebar-2 via /templates/gk_spotlight/templateDetails.xml

    2/ Open the layout file: /templates/gk_spotlight/layouts/default.php and load the position 'sidebar-2' to underneath the mainbody section.

    defaultphp.zip
    4kB

    3/ Add this custom css:

    @media (min-width: 1040px) {
      #gkBg-main .space-desktop {
        margin-left: 200px;
    
      }
    }
    
    @media (min-width: 1040px) {
      #gkSidebar2 {
        border: 1px solid #E5E5E5;
        border-top-width: 1px;
        border-top-style: solid;
        border-top-color: rgb(229, 229, 229);
        border-top: 4px solid #161E2D;
        height: 100vh;
        position: fixed;
        top: 0;
        right: 0;
        width: 340px;
        z-index: 99;
        padding-left: 25px;
        padding-right: 25px;
      }
    }

    4/ Assign module you want to this sidebar-2 position

    Hope this helps.

    Write a Reply...
    You need to Login to view replies.