here's some test code, it is not smart, but i just wanted to print out all links alphabetical from all items in the database.
You'd need to be able to refine the category, and link to a new list view which would be articles, with pagination.
I may need to send this to odesk or similar, unless someone can make a simple plugin for the community.
heres some test code if anyone wants to print out results
<?php
$hostname = "localhost";
$database = "adddbname";
$username = "adddbusername";
$password = "addpassword";
$connection1 = mysql_pconnect($hostname, $username, $password) or trigger_error(mysql_error(),E_USER_ERROR);
$table = "oanfc_k2_items";
//Data Extraction
mysql_select_db($database, $connection1);
$query = "SELECT DISTINCT UPPER(LEFT(title,1)) as letters FROM $table ORDER BY letters";
if ($result = mysql_query($query)) {
while ($row = mysql_fetch_array($result)) {
$letter_string .= $row["letters"];
}
}
$letter_array = range('A','Z');
foreach ($letter_array as $letter) {
if (stristr($letter_string, $letter) === FALSE) echo $letter . " | ";
else echo '<a href="index.php?option=com_k2&view=itemlist&layout=category<r="'.$letter.'" rel="nofollow">"'.$letter.'"</a> | ';
}
; ?>
yes yes yes, i know this is not how you create plugins/modules, nor use the MVC, so i put this into components/com_ks/templates/default/item.php just to view.