[ic] long tail links

DB db at m-and-d.com
Sat Apr 28 15:33:36 UTC 2018


> 
> 
> This file was created for me to generate long tail links on our website.  However when on a page with https the long tail links are http.  Can anyone help me figure out how to fix this so if your on a page with https the long tail links go to https? 
> 
> On page code [long_tail "sku"]
> 
> The file is in interchange/usertag/ and is called long_tail.tag
> 
> Here is the code in that file:
> 
> UserTag long_tail Order sku
> UserTag long_tail addAttr
> UserTag long_tail Routine <<EOR
> sub {
>        my $sku = shift;
>        my $opt = shift;
>        $opt->{no_session} = 1 unless defined $opt->{no_session};
>        use vars qw/ $Tag /;
>        my $db = dbref('products')
>                or do {
>                        ::logError("no products db!");
>                        return $Tag->area($sku);
>                };
>        my ($long, $desc) = $db->get_slice($sku, [ qw/ long_tail description / ]);
>        if(! $long and ! $desc) {
>                ::logError("no sku=$sku in products db, called by long_tail");
>                return $Tag->area($sku);
>        }
>        $long ||= $desc;
>        $long =~ s/--/-/g;
>        $long =~ s/\W+/-/g;
>        $long =~ s/^$sku//;
>        $long =~ s/^-+//;
>        $long = join "--", $sku, $long;
>        return $Tag->area({ href => $long, no_session => $opt->{no_session}});
> }
> EOR
> 
> GlobalSub long_tail_missing <<EOS
> sub {
>        my $sku = shift;
>        return unless $sku =~ s/--.*//s;
>        my $db = dbref('products')
>                or return;
>        my ($resku, $template) = $db->get_slice($sku, [ qw/ sku template_page / ]);
>        return unless $resku;
>        $template ||= 'flypage';
>        $Vend::Session->{arg} = $sku;
>        return(1, $template);
> }
> EOS


Hi - the 'area' tag has a 'secure' option that may do the trick. Or set 
both SecureURL and VendURL to use https.

DB

http://docs.icdevgroup.org/cgi-bin/online/tags/area.html



More information about the interchange-users mailing list