Ausgabe Zeilennummer im Katalogtemplate

More
8 years 2 months ago #3744 by Michael
Hallo,
ganz toll wäre es, wenn es eine Funktion geben würde, mit der man die entsprechende Zeilennummer innerhalb des Loops mit ausgeben könnte. Auch nach einer Umsortierung über die Sortlink Funktion müsste dann die Nummerierung wieder von 1 beginnen. Evtl. gibt es ja schon so eine Funktion? Leider konnte ich aber nichts Derartiges finden.
LG, Michael

Please Log in to join the conversation.

More
8 years 2 months ago #3745 by Dirk
Replied by Dirk on topic Ausgabe Zeilennummer im Katalogtemplate
With the pro version you could write yourself a counter plugin.

create a file called counter.php in /components/com_joodb/plugins and call {joodb counter} within the loop part of your catalog template.
<?php
// no direct access
defined('_JEXEC') or die('Restricted access');
global $jbcounter;
if (!isset($jbcounter)) $jbcounter = 0;
$jbcounter++;
$output .= $jbcounter;

Please Log in to join the conversation.

Moderators: Dirkjoest