Tagged: 

Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • anatom09 Friend
    #928038

    Change default view for masonry pages, from grid to list.

    Is that possible?

    Thank you

    Pankaj Sharma Moderator
    #928465

    Hi
    try this
    go to /html/com_content/category/masnorylyout.php file
    find this code

        <a class="project-grid<?php echo $bloglayout!=1?' active':''?>" href="javascript:void(0)" data-option-value="masonry"><span><i class="fa fa-th-large"></i></span></a>
            <a class="project-list<?php echo $bloglayout==1?' active':''?>" href="javascript:void(0)" data-option-value="straightDown"><i class="fa fa fa-th-list"></i></a>
    

    replace it with

    <a class="project-list<?php echo $bloglayout==1?' active':''?>" href="javascript:void(0)" data-option-value="masonry"><i class="fa fa fa-th-list"></i></a>      
          <a class="project-grid<?php echo $bloglayout!=1?' active':''?>" href="javascript:void(0)" data-option-value="straightDown"><span><i class="fa fa-th-large"></i></span></a>
    

    Let me know if it helps .

    anatom09 Friend
    #928520

    This didnt work.

    I had to use this as the second line:
    <a class="project-grid<?php echo $bloglayout!=1?”?>" href="javascript:void(0)" data-option-value="straightDown"><i class="fa fa-th-large">

    I am not very familiar with php, what I did was delete the " active’:’ " . Is it wrong? It works

    Pankaj Sharma Moderator
    #928720

    Hi
    Removing the 2nd line means you will not have option to switch the layout as you deleted option to switch in the grid view , Now you can see there is only one view for the layout .

    anatom09 Friend
    #928758

    Maybe I did not explain it well.

    I did not remove the second line. I replaced it with this:
    <a class="project-grid<?php echo $bloglayout!=1?”?>" href="javascript:void(0)" data-option-value="straightDown"><i class="fa fa-th-large">

    So this was my final 2 lines:

    <a class="project-list<?php echo $bloglayout==1?’ active’:”?>" href="javascript:void(0)" data-option-value="masonry"><i class="fa fa fa-th-list">
    <a class="project-grid<?php echo $bloglayout!=1?”?>" href="javascript:void(0)" data-option-value="straightDown"><i class="fa fa-th-large">

    It works perfectly, but I dont know if technicaly it is correct. I simly removed the ‘active’ state between the questionmarks of the second line.

    Pankaj Sharma Moderator
    #928812

    Hi
    removing active state means the view is not active in that time . You can also use this change on site .
    please take backup of original file before applying changes on core files .

    anatom09 Friend
    #929377

    I still cant make this work…

    Still the grid is default.

    Pankaj Sharma Moderator
    #929398

    Hi
    Kindly post your site super user details , I will check and fix it on your site .

    acusticambiente Friend
    #982910

    i have the same problem. how can i change default layout? i tryed the solutions above but it doesn’t work…

    Pankaj Sharma Moderator
    #982978

    i have the same problem. how can i change default layout? i tryed the solutions above but it doesn’t work…

    Hi could u open your own thread and add your site details in that , so that we can assist you better .

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

This topic contains 9 replies, has 3 voices, and was last updated by  Pankaj Sharma 7 years, 6 months ago.

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