Jump to content

Pagination MarkupNav


MateThemes
 Share

Recommended Posts

Hello everyone!

I have a problem with pagination. I have following code:

<div class="uk-section">
  <?php
  	$results = $pages->find("template=gallery, limit=10, sort=title");
    $pagination = $results->renderPager();
  		echo $pagination;
        echo "<ul class='uk-pagination uk-flex-center'>";
        foreach($results as $result) {
          echo "<li><a href='{$result->url}'>{$result->title}</a></li>";
        }
        echo "</ul>";
       	echo $pagination; ?>
</div>

Which works fine. And this markup results in following html code:

<div class="uk-section">
  <ul class='uk-pagination uk-flex-center'>
    <li>
      <a href='/galerie-bisheriger-projekte/'>Galerie bisheriger Projekte</a>
    </li>
    <li>
      <a href='/galerie-bisheriger-projekte/galerie-1/'>galerie-1</a>
    </li>
  </ul>                    
</div>

But instead of "Galerie bisheriger Projekte" and "galerie-1" I want to have a number.

And as last question, how can I add a previous and next button?

Thanks for your help!

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...