Advertisement:

Author Topic: List and Grid view  (Read 1267 times)

rizwan65

  • Newbie
  • *
  • Posts: 49
List and Grid view
« on: October 10, 2014, 07:31:48 am »
Hi
I want 2 different default listing views i.e Gallery View on Home page (main.php) and List View on Search page (search.php)

Any help will be appriciated

Rizwan   

aide2001

  • Guest
Re: List and Grid view
« Reply #1 on: October 10, 2014, 03:51:15 pm »
What theme are you running, and have you set that in your admin?

rizwan65

  • Newbie
  • *
  • Posts: 49
Re: List and Grid view
« Reply #2 on: October 12, 2014, 07:10:28 am »
Yes I have setup in admin
While setting in admin both homepage and search displays same display whichever is selected

Whereas I want Homepage to display Gallery View and Search page to display List view

Below is the code

main.php
Code: [Select]
    $buttonClass = '';
    $listClass   = '';
    if(osc_main_show_as() == 'gallery'){
          $listClass = 'listing-grid';
          $buttonClass = 'active';
    }[code]
[/code]

search.php
Code: [Select]
if(osc_search_show_as() == 'gallery'){
          $listClass = 'listing-grid';
          $buttonClass = 'active';
    }

cartagena68

  • issues
  • Hero Member
  • *
  • Posts: 1198
Re: List and Grid view
« Reply #3 on: October 12, 2014, 07:40:27 am »
Hi,
in one of the code you can change
if(osc_search_show_as() == 'gallery')
with
Code: [Select]
if(osc_search_show_as() != 'gallery')i think you should change in search.php

rizwan65

  • Newbie
  • *
  • Posts: 49
Re: List and Grid view
« Reply #4 on: October 12, 2014, 09:20:09 am »
Thanks a lot bro