Home N-13 News Forums Help Search
RegisterForgot password?
How to add image to post necklacesdiscou
Known bugs - 4.0.3 necklacesdiscou

Latest N-13 News 4.0.3

What is N-13 News?
Where can I get help?
Known bugs

Forums Help & Support Sorting through A to Z
William
Posted on 27 Jun 2010, 20:28:02

Access: Member
Total Posts: 38
Joined: 2010-02-12

Has it been made possible yet to order the include from A to Z?

Reason being, I would like to be able to set up a sort of MENU for my client that would display her blog titles in a menu format that is ordered alphabetically. This, in its most primitive form would be great.

To press further, would it be possible to paginate the menu by alphabet.
I.E.- instead of displaying page numbers on the pagination like 1, 2, 3, 4, etc... it would display like A, B, C, D, E, etc...

William
#2567
Chris
Posted on 27 Jun 2010, 22:42:14

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Sorting news articles from A-Z based on the title is already possible. See here

http://code.google.com/p/n-13news/wiki/Integration

Code:
<?php
$orderby 
= 'title';
$newsorder = 'ASC'; // or DESC
include 'news/index.php';
?>
#2570
William
Posted on 28 Jun 2010, 04:11:30

Access: Member
Total Posts: 38
Joined: 2010-02-12

Okay, so the ASC orderby will order the posts alphabetically. Cool!

What about getting the pagination to be able to display a,b,c,d,etc...? to much huh....?
#2574
Last edited by William at 2010-06-28 04:11:44 Reason:
Chris
Posted on 28 Jun 2010, 13:13:18

Access: Admin
Total Posts: 1395
Joined: 2006-05-19

Getting the pagintation to display a-z instead of 0-9 would indeed be a bit too much. Perhaps the easiest way to do it would be to manually create your own pagintation.

Code:
<a href="?page=1">A</a>
<a href="?page=2">B</a>
<a href="?page=3">C</a>
<a href="?page=4">D</a>


Though this isn't really ideal as it offers no way to count how many pages there actually are.

When I get a bit of time I'll look into creating a better solution for this.
#2575
Network-13.com © 2013