Gossamer Forum
Quote Reply
Active categories global In reply to
A bit of progress on this front... this global does (almost) what I need:
Code:
sub {
my $output;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Name');
my $sth = $cat_db->select ({Has_New_Links => 'Yes'} );
while (my $cat = $sth->fetchrow_hashref) {
$output .= Links::SiteHTML::display ('newcategory', $cat);
}
return $output;
}
Example

I've created a new template, newcategory, that uses <%Full_Name%> and <%Name%>.

The problem is that Full_Name is "Full Name" and not "Full_Name", and that the urlified tag doesn't work here. I've met this problem before, and thought the solution would be something like this:

Code:

sub {
my $output;
my $cat_db = $DB->table('Category');
$cat_db->select_options ('ORDER BY Name');
my $sth = $cat_db->select ({Has_New_Links => 'Yes'} );
while (my $cat = $sth->fetchrow_hashref) {
my $path = $cat_db->as_url($cat->{Full_Name});
$output .= Links::SiteHTML::display ('newcategory', $path);
}
return $output;
}

Can anyone see what is wrong here? (I can't)

Another question: With all the new loop-stuff in GLinks, is there an easier way to do this??

John
Subject Author Views Date
Thread Active categories gotze 13717 Apr 17, 2005, 4:43 AM
Thread Re: [gotze] Active categories
Alba 13138 Apr 17, 2005, 5:33 AM
Thread Re: [Alba] Active categories
gotze 13183 Apr 17, 2005, 5:56 AM
Post Re: [gotze] Active categories
Alba 13123 Apr 17, 2005, 6:33 AM
Thread Active categories global
gotze 13067 Apr 23, 2005, 1:26 PM
Thread Re: [gotze] Active categories global
gotze 13215 Apr 23, 2005, 1:36 PM
Post Re: [gotze] Active categories global
gotze 13077 May 7, 2005, 7:00 PM
Thread Re: [gotze] Active categories
brewt 13088 May 9, 2005, 7:47 PM
Post Re: [brewt] Active categories
Payooo 12990 May 9, 2005, 11:47 PM
Thread Re: [brewt] Active categories
gotze 13024 May 10, 2005, 12:35 AM
Thread Re: [gotze] Active categories
brewt 13078 May 10, 2005, 12:47 AM
Post Re: [brewt] Active categories
Payooo 13025 May 10, 2005, 12:59 AM
Thread Re: [brewt] Active categories
gotze 13063 May 10, 2005, 1:04 AM
Thread Re: [gotze] Active categories
brewt 13026 May 10, 2005, 1:20 AM
Thread Re: [brewt] Active categories
brewt 12933 May 10, 2005, 1:23 AM
Thread Sorting
gotze 13028 May 10, 2005, 7:21 AM
Thread Re: [gotze] Sorting
Matthias70 12548 Sep 25, 2007, 1:48 PM
Thread Re: [Matthias70] Sorting
Andy 12620 Sep 26, 2007, 6:35 AM
Post Re: [Andy] Sorting
Matthias70 12533 Sep 26, 2007, 8:56 AM
Thread Re: [Andy] Sorting
Andy 12557 Sep 26, 2007, 9:09 AM
Thread Re: [Andy] Sorting
Matthias70 12524 Sep 26, 2007, 9:47 AM
Thread Re: [Matthias70] Sorting
Andy 12544 Sep 26, 2007, 9:51 AM
Thread Re: [Andy] Sorting
Matthias70 12491 Sep 26, 2007, 10:01 AM
Thread Re: [Matthias70] Sorting
Matthias70 12557 Sep 26, 2007, 10:24 AM
Thread Re: [Matthias70] Sorting
Matthias70 5693 Sep 26, 2007, 12:25 PM
Thread Re: [Matthias70] Sorting
Andy 5695 Sep 27, 2007, 1:03 AM
Thread Re: [Andy] Sorting
Matthias70 5717 Sep 27, 2007, 5:38 AM
Thread Re: [Matthias70] Sorting
Jesus 5633 Oct 2, 2007, 2:27 PM
Thread Re: [Jesus] Sorting
Matthias70 5668 Oct 2, 2007, 3:11 PM
Post Re: [Matthias70] Sorting
Jesus 5599 Oct 2, 2007, 11:11 PM
Thread Re: [Matthias70] Sorting
Matthias70 5460 Apr 13, 2008, 11:39 AM
Thread Re: [Matthias70] Sorting
Andy 5497 Apr 13, 2008, 12:03 PM
Thread Re: [Andy] Sorting
Matthias70 5531 Apr 13, 2008, 12:41 PM
Thread Re: [Matthias70] Sorting
Andy 5529 Apr 13, 2008, 1:29 PM
Thread Re: [Andy] Sorting
Matthias70 5461 Apr 13, 2008, 2:17 PM
Post Re: [Matthias70] Sorting
Andy 5441 Apr 14, 2008, 12:15 AM
Post Re: [brewt] Active categories
brewt 12974 May 10, 2005, 12:57 AM