[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
Re: [mv] More list into two variables? Next & Previous
****** message to minivend-users from Mike Heins <mikeh@minivend.com> ******
Quoting Bill Randle (billr@exgate.tek.com):
>
> On Oct 4, 4:36pm, minivend@hq.com.au wrote:
> } Subject: [mv] More list into two variables? Next & Previous
> } ****** message to minivend-users from minivend@hq.com.au ******
> }
> } Looking through the docs;
> } [more-list next_img prev_img none 0]
> } [more]
> } [/more-list]
> } Makes 2 Images on the results page for next and previous.
> }
> }
> } How can I make them 2 variables to recall without hacking Interpolate.pm?
> }
> } So I have a Next and Previous Variable that is updated with each search....
> }
> } Ideas?
> }
> } Geoff
>
> Geoff,
>
> When I first saw your question, I figured there must be some
> hook to pick up the URLs for previous and next. However, when
> nobody responded and you reposted your question, I took it as
> a challenge to see if it could be done.
>
> After looking at tag_more_list() in Interpolate.pm (MV4.04) for awhile,
> it became obvious that there was no built in facility to get the
> previous and next links because tag_more_list() inserts the links
> directly into the page and doesn't set any handy vars with the info.
>
> The easiest way, would be to hack Interpolate.pm and stick a copy
> of the link text into a couple of scratch vars. However, since you
> specifically said you didn't want to do that, the alternative is
> to extract the the code in tag_more_list() and put in your own
> [perl] block, UserTag, GlobalSub. etc.
>
> I tested the [perl] block below with MV4.04 and it looks like it works.
>
> BTW, Mike: I notice a minor typo on line 2793 of Interpolate.pm:
>
> < if($r =~ s:\[prev[-_]anchor\]($All)\[/prev-anchor\]::i) {
> ---
> > if($r =~ s:\[prev[-_]anchor\]($All)\[/prev[-_]anchor\]::i) {
>
Fixed in Interchange, thanks Bill. I will bear in mind the ability to
do something like a [more-calc] [/more-calc] or such in the future.
--
Akopia, Inc., 131 Willow Lane, Floor 2, Oxford, OH 45056
phone +1.513.523.7621 fax 7501 <heins@akopia.com>
Unix version of an Outlook-style virus:
It works on the honor system. Please forward this message to everyone
you know, and delete a bunch of your files at random.
-
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