Bagisto Forum

    Bagisto

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

    pagination for featured products in default theme

    General Discussion
    2
    5
    296
    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

      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

        @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 Reply Quote 0
        • R
          Rahul74 @Vaishali Agarwal last edited by

          @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 Reply Quote 0
          • R
            Rahul74 @Rahul74 last edited by

            @Rahul74 @Vaishali-Agarwal Can u help here

            1 Reply Last reply Reply Quote 0
            • V
              Vaishali Agarwal last edited by

              @Rahul74
              respective developer will reply to you here soon.

              Thanks.

              1 Reply Last reply Reply Quote 0
              • First post
                Last post