MiniVend Akopia Services

[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date ][Minivend by thread ]

trying to build a link to categories using perl



******    message to minivend-users from NOW Internet Coordinator <webperson@now.org>     ******

I'm using Minivend 3.04 (haven't upgraded Perl yet to 5.004).

I'm trying to make my categories field link to scans using those categories. 
I've taken some Perl code someone posted to the list a while ago and modified
it, and it*almost* works, but not quite.  It produces this HTML code:

<b><FONT COLOR="#400080">Category: </b></font> 
 [page scan/se=Children/sf=category]Children</a> 
 [page scan/se=Art/sf=category]Art</a> 
 [page scan/se=Diversity/sf=category]Diversity</a> 


[/page] gets changed to </A>, but not [page scan...]


Here is the code:

<b><FONT COLOR="#400080">Category: </b></font> 
[perl]
$categories = q%[item-field category]%;
$itemcat = q%[item-field category]%;
@categories = split(/,/,$categories);
foreach $category (@categories) {
        $RealCat = $category;
        $category =~ s/\s+//;
        ($itemcat eq $category) ? 
($catstring = qq% [page scan/se=$category/sf=category]$category[/page] %) :
($catstring = qq% [page scan/se=$category/sf=category]$category[/page] %);


        push(@options,$catstring);
}
$output = join("\n",@options);
$output;
[/perl]


Ideas?

P.S.  Is anyone else with Solaris 2.5 and Perl 5.003 successfully using
Minivend 3.11?   
------------------------------------------------------------------
Sarah  Stapleton-Gray
NOW LAN and Internet manager.  Please visit http://www.now.org/
-
To unsubscribe from the list, DO NOT REPLY to this message.  Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list


Search for: Match: Format: Sort by: