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

Bagisto

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

pagination for featured products in default theme

General Discussion
2
5
297
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.
  • R
    Rahul74 last edited by 10 Sept 2020, 07:32

    How to create pagination for featured products in default theme in the front page???

    1 Reply Last reply Reply Quote 0
    • V
      Vaishali Agarwal last edited by 10 Sept 2020, 08:30

      @Rahul74
      we have already guide you here https://forums.bagisto.com/topic/1722/pagination-at-default-theme-home-page/3 once you implemented then please show the code where are you stuck??

      R 1 Reply Last reply 10 Sept 2020, 11:22 Reply Quote 0
      • R
        Rahul74 @Vaishali Agarwal last edited by 10 Sept 2020, 11:22

        @Vaishali-Agarwal In the productrepository.php page, i was trying to add this pagination code, but not working.
        @if ($paginator->hasPages())
        <div class="pagination shop mt-50">
        {{-- Previous Page Link --}}
        @if ($paginator->onFirstPage())
        <a class="page-item previous">
        <i class="icon angle-left-icon"></i>
        </a>
        @else
        <a data-page="{{ urldecode($paginator->previousPageUrl()) }}" href="{{ urldecode($paginator->previousPageUrl()) }}" id="previous" class="page-item previous">
        <i class="icon angle-left-icon"></i>
        </a>
        @endif

            {{-- Pagination Elements --}}
            @foreach ($elements as $element)
                {{-- "Three Dots" Separator --}}
                @if (is_string($element))
                    <a class="page-item disabled" aria-disabled="true">
                        {{ $element }}
                    </a>
                @endif
        
                {{-- Array Of Links --}}
                @if (is_array($element))
                    @foreach ($element as $page => $url)
                        @if ($page == $paginator->currentPage())
                            <a class="page-item active">
                                {{ $page }}
                            </a>
                        @else
                            <a class="page-item as" href="{{ urldecode($url) }}">
                                {{ $page }}
                            </a>
                        @endif
                    @endforeach
                @endif
            @endforeach
        
            {{-- Next Page Link --}}
            @if ($paginator->hasMorePages())
                <a href="{{ urldecode($paginator->nextPageUrl()) }}" data-page="{{ urldecode($paginator->nextPageUrl()) }}" id="next" class="page-item next">
                    <i class="icon angle-right-icon"></i>
                </a>
            @else
                <a class="page-item next">
                    <i class="icon angle-right-icon"></i>
                </a>
            @endif
        </div>
        

        @endif

        I want to show the pagination for featured products in default theme. Help me

        R 1 Reply Last reply 10 Sept 2020, 15:14 Reply Quote 0
        • R
          Rahul74 @Rahul74 last edited by 10 Sept 2020, 15:14

          @Rahul74 @Vaishali-Agarwal Can u help here

          1 Reply Last reply Reply Quote 0
          • V
            Vaishali Agarwal last edited by 10 Sept 2020, 15:16

            @Rahul74
            respective developer will reply to you here soon.

            Thanks.

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