• Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Register
  • Login
Bagisto Forum

Bagisto

  • Register
  • Login
  • Search
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups

Change card display type

General Discussion
products card carousel list
2
5
826
Loading More Posts
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • P
    phenomKay last edited by 22 Nov 2023, 07:05

    how do i set the mode to switch the display from grid to list? because this gives me this error: syntax error, unexpected token "]", expecting "("
    home/index.blade.php. i'm using bagisto 2

    <x-shop::products.carousel
        title="New Arrivals"
        :src="route('shop.api.products.index', ['new' => 1])"
        :navigation-link="route('shop.api.products.index', ['new' => 1])"
        :mode="list"
    >
    </x-shop::products.carousel>
    

    components/products/card.blade.php

    <!-- Grid Card -->
    <div
        class='grid gap-2.5 content-start w-full relative'
        v-if="mode != 'list'"
    >
    </div>
    <!-- List Card -->
    <div
        class="flex gap-[15px] grid-cols-2 max-w-max relative max-sm:flex-wrap rounded-[4px] overflow-hidden"
        v-else
    >
    </div>
    
    ashish2409 1 Reply Last reply 23 Nov 2023, 03:14 Reply Quote 0
    • ashish2409
      ashish2409 @phenomKay last edited by 23 Nov 2023, 03:14

      @phenomKay
      Hello there,
      Is this happening in Bagisto 2.0 version?

      P 1 Reply Last reply 24 Nov 2023, 00:19 Reply Quote 0
      • P
        phenomKay @ashish2409 last edited by 24 Nov 2023, 00:19

        @ashish2409 yes please

        ashish2409 1 Reply Last reply 24 Nov 2023, 06:58 Reply Quote 0
        • ashish2409
          ashish2409 @phenomKay last edited by 24 Nov 2023, 06:58

          @phenomKay
          As I was checking above screenshot details i found that you are passing :mode="list" in the product carousel
          may i know so that I can help you to resolve your query.

          P 1 Reply Last reply 24 Nov 2023, 13:13 Reply Quote 0
          • P
            phenomKay @ashish2409 last edited by 24 Nov 2023, 13:13

            @ashish2409 i don't know where to indicate the type of display to use. i was guessing it would be there, since it's part of the properties or @props

            1 Reply Last reply Reply Quote 0
            5 out of 5
            • First post
              5/5
              Last post