Skip to main content
Inspiring
September 25, 2017
Answered

Help starting Pagination

  • September 25, 2017
  • 1 reply
  • 931 views

I'm trying to create a "news" page and only want to display a few articles at a time. I've added a pagination navigation at the bottom of the page but I have no idea how to even start getting everything to work. I've done a lot of googling but I can't find an tutorials that can help. Nearly everything I found is on how to just create the nav bar. I've seen suggestions on jQuery plugins and so on, but nothing on how to even get started. Can someone point me in the right direction?

Sample of code (if needed)

    <div class="col-lg-8">

      <article class="row">

        <div class="col-xs-12">

          <h1>News</h1>

          <hr>

          <img src="Images/Originals/header placeholder.jpg" alt="Placeholder image" class="img-responsive center-block" id="header_image">

          <h4>August 30, 2017</h4>

          <p><a href="#" target="_parent">Mr. John Klingel joins Quantum Research International, Inc.</a></p>

         

          <h4>August 16, 2017</h4>

          <p><a href="#" target="_parent">Quantum Research International and Adcole Maryland Aerospace Announce Successful Launch of Kestrel Eye Block II Satellite</a></p>

         

          <h4>July 13, 2017</h4>

          <p><a href="#" target="_parent">Quantum Awarded Work for Joint Staff Combined Fire Support Interoperability Division</a></p>

          <h4>July 13, 2017</h4>

          <p><a href="#" target="_parent">Quantum Awarded Work for Joint Staff Deployable Analysis Team</a></p>

          <h4>June 23, 2017</h4>

          <p><a href="#" target="_parent">Quantum Awarded Work for Operationally Responsive Space Support</a></p>

          <h4>April 5, 2017</h4>

          <p><a href="#" target="_parent">National Security Cyber Assistance Program (NSCAP) Vulnerability Assessment Service Accreditation</a></p>

          <h4>Februrary 10, 2017</h4>

          <p><a href="#" target="_parent">Mr. James Lackey Joins Quantum as Senior VP and Defense Systems Group Manager</a></p>

          <h4>Februrary 10, 2017</h4>

          <p><a href="#" target="_parent">Mr. Brad Kettner Promoted to Manager, Space and Warfighter Division and Program Manager, COSMIC</a></p>

            </div>

      </article>

    </div>

  </div>

  <div class="row">

    <div class="col-xs-12">

    <nav class="text-center">

    <!-- Add class .pagination-lg for larger blocks or .pagination-sm for smaller blocks-->

    <ul class="pagination">

      <li> <a href="#" aria-label="Previous"> <span aria-hidden="true">&laquo;</span> </a> </li>

      <li class="active"><a href="#">1</a></li>

      <li><a href="#">2</a></li>

      <li><a href="#">3</a></li>

      <li><a href="#">4</a></li>

      <li class="disabled"><a href="#">5</a></li>

      <li> <a href="#" aria-label="Next"> <span aria-hidden="true">&raquo;</span> </a> </li>

    </ul>

  </nav>

    </div>

  </div>

This topic has been closed for replies.
Correct answer Nancy OShea

Well I've figured out a way to basically create what I want for the mean time, though it will require a lot of moving things around as I need to add items. So, I have as much time as I need to build this version of the page on the side.


I haven't tried this but it might do what you need.

https://newsscriptphp.com/

DEMO:

https://newsscriptphp.com/demo-news.php

1 reply

Nancy OShea
Community Expert
Community Expert
September 25, 2017

I'm not sure what YOU mean by a news page.  It means different things to different people. 

Are asking about RSS feeds?  Or are you pulling content into your pages from a database of news articles?  Or is this just a collection of static HTML pages?

Nancy

Nancy O'Shea— Product User & Community Expert
Inspiring
September 25, 2017

A collection of static HTML pages. Basically it will be a central page within the site that will have links to the various news stories that we post about the company. Here's a site example to help demonstrate what I mean.

Media - Lockheed Martin - Releases

As you can see, this page displays a handful of news stories, each linking to their own page. At the bottom is the numbered nav bar so that viewers can see "more" links.

Nancy OShea
Community Expert
Community Expert
September 25, 2017

Your example is not static HTML.  The URLs and advanced search features tells me it's dynamically driven.

How good are you with PHP & MySQL?

Nancy O'Shea— Product User & Community Expert