Hi,
I am using Pagebuilder to auto-generate a list of contributors (in case anyone is interested :-)
I added a field to Users called Contributors (Enum > Yes/No) and anither field called 'bio'
The used the following global:
fetch_editors
my $tags = shift;
local $_ = $tags;
lib->import('/path/to/admin');
my $table = GT::SQL->new('/path/to/admin/defs')->table('Users');
$table->select_options ('ORDER BY Name ASC', 'LIMIT 100');
my $sth = $table->select ( { Contributor => 'Yes'} );
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}
Then insert the following in the template where you want the info:
<%loop top5_loop%>
<b><%Name%></b><br>
<%bio%>
<hr>
<br>
<%endloop%>
Cheers
Klaus
http://www.ameinfo.com
I am using Pagebuilder to auto-generate a list of contributors (in case anyone is interested :-)
I added a field to Users called Contributors (Enum > Yes/No) and anither field called 'bio'
The used the following global:
fetch_editors
Code:
sub { my $tags = shift;
local $_ = $tags;
lib->import('/path/to/admin');
my $table = GT::SQL->new('/path/to/admin/defs')->table('Users');
$table->select_options ('ORDER BY Name ASC', 'LIMIT 100');
my $sth = $table->select ( { Contributor => 'Yes'} );
my @output;
while (my $link = $sth->fetchrow_hashref) {
push (@output, $link);
}
return { top5_loop => \@output };
}
Then insert the following in the template where you want the info:
Code:
<%fetch_editor%> <%loop top5_loop%>
<b><%Name%></b><br>
<%bio%>
<hr>
<br>
<%endloop%>
Cheers
Klaus
http://www.ameinfo.com