Hi, I've allready posted a customtag that process pages numbering issue in a flexible manner
I wish to write a complete article to detail the implmeentation but it's
allready simple to use
One point is that using js to create the links will stop the searchbots from
following each links.
Gauthier
----- Original Message -----
From: "[Gauthier]" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Saturday, July 13, 2002 10:28 AM
Subject: Re: Witango-Talk: Previous 1 2 3 4 5 6 Next page links wanted
> Hi,
>
> here it is:
> you just have to put the .xml into the Configuration/CustomTags directory
of
> the server
> and to put the tcf anywhere along your TCFSEARCHPATH
>
> a brief explanation of the customtags.tcf:
> process_ListArg is used to manipulate searcharguments, it's also usefull
as
> stand alone, you have to arguments
> -UPDATE wich take an delimited couple of argname, argvalue: <@LISTARG
> UPDATE="MyArg1,MyValue1;MyArg2,MyValue2"> this should return
> MyArg1=MyValue1&MyArg2=MyValue2&<ALL YOUR PREVIOUS SEARCH ARG>
> -DELETE wich take a delimited argnames : <@LISTARG DELETE="MyArg1">
> if your url was like this: file?MyArg1=azerty&MyArg2=qsdfghj it should
> return: file?MyArg2=qsdfghj
>
> hope this is understandable :)
>
> next is the <@PREVNEXT> tag wich is self explained with the .taf
>
> Hope this is usefull to the communauty
>
> Gauthier
>
> ----- Original Message -----
> From: "Dan Stein" <[EMAIL PROTECTED]>
> To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
> Sent: Saturday, July 13, 2002 4:56 AM
> Subject: Re: Witango-Talk: Previous 1 2 3 4 5 6 Next page links wanted
>
>
> > Gauthier,
> > I'd love to see the custom tag and how it works if you would be willing
to
> > post it somewhere.
> > --
> > Dan Stein
> > Digital Software Solutions
> > 799 Evergreen Circle
> > Telford PA 18969
> > Land: 215-799-0192
> > Mobile: 610-256-2843
> > Fax 413-410-9682
> > FMP, WiTango, EDI,SQL 2000
> > [EMAIL PROTECTED]
> > www.dss-db.com
> >
> >
> > > From: "[Gauthier]" <[EMAIL PROTECTED]>
> > > Reply-To: [EMAIL PROTECTED]
> > > Date: Sat, 13 Jul 2002 00:47:25 +0200
> > > To: Multiple recipients of list witango-talk
<[EMAIL PROTECTED]>
> > > Subject: Re: Witango-Talk: Previous 1 2 3 4 5 6 Next page links
wanted
> > >
> > > I currently use a customtag for this purpose but since you still use
> tango
> > > 3.6 this should not be available (or I'm totaly wrong?).
> > >
> > > here is a basic logic to build your own implementation:
> > > you need a start, a stop, a max for page numbers calculation
> > > you need the searchargument name for retrieving/setting the start
value
> and
> > > be able to display multiple prev/next sections (wich you cant' with an
> > > unique searchargument)
> > >
> > > with this in hand you can generate a for loop that will put your links
> > >
> > > here is a quick file that I've done on those german keyboard from
> SoftDes
> > > office, please don't beat me if it contain's any bug ;)
> > >
> > > Maybe another one have a complete exemple in a taf
> > >
> > > hope this help
> > >
> > > Gauthier
> > >
> > > ----- Original Message -----
> > > From: "Nicholas Froome" <[EMAIL PROTECTED]>
> > > To: "Multiple recipients of list witango-talk"
> <[EMAIL PROTECTED]>
> > > Sent: Friday, July 12, 2002 11:39 PM
> > > Subject: Witango-Talk: Previous 1 2 3 4 5 6 Next page links wanted
> > >
> > >
> > >>
> > >>
> > >> I'd like to provide a Google-style page "readout" on multi-page
results
> to
> > > searches, in the traditional style:
> > >>
> > >> Previous 1 2 3 4 5 6 Next
> > >>
> > >> The Tango Search Builder creates some (hugely complex) code for
> successive
> > > page links, and uses Forms with Submit buttons and hidden fields to
pass
> > > arguments
> > >>
> > >> Has anyone built or used a suitable replacement for this that uses a
> > > Google-like style? Or can they recommend anything to acquire code
from?
> > >>
> > >>
> > >> We're using Tango 3.6x, Mac OS 9.2x, Webstar 4.x
----- Original Message -----
From: "Nicholas Froome" <[EMAIL PROTECTED]>
To: "Multiple recipients of list witango-talk" <[EMAIL PROTECTED]>
Sent: Tuesday, December 10, 2002 12:34 PM
Subject: Re: Witango-Talk: ebay-style 1 2 3 4 page numbering (revisited),
update
>
> >Why does it have to be done in Javascript anyway? It
> >can be done relatively straight forward with Witango
> >and still look exactly the same to the user as the
> >Javascript you've given below.
>
> OK, I'll admit that there's no real reason to do it in javascript - and in
fact there are good reasons not to. I'm still on Tango 3.6 and probably will
be for some time so maybe it seemed easier...
>
> I did quite a bit of work on it yesterday; this is how far I've got. I
gave up on the looping to generate the page numbers (that really seems
ideally suited to javascript) and worked on the start record and page number
logic and on making the current page number bold
>
>
> This is the "jump to page number x" code. I've used an ARG "pagenumber"
with an ID from the link. It also allows the number of records returned to
be set
>
>
>
> <SCRIPT LANGUAGE="JAVASCRIPT">
> function GoToPage( id )
> {
> window.location = ( 'http://www.bolide.co.uk<@CGI><@APPFILE>?link=<@ARG
link>&rows=10&&pagenumber=' + id);
> }
> </SCRIPT>
>
>
> The page to be displayed is set up in the Search Builder with
>
> "Start Retrieval at Row Number" = <@CALC EXPR="(<@ARG PAGENUMBER> * <@ARG
ROWS>) - <@ARG ROWS> +1">
>
>
>
> This sets the current page as Bold - except when it's the first page
because there's no pagenumber ARG... You need a page Onload in the body tag
>
> onLoad="javascript:BoldId();"
>
>
>
> <SCRIPT LANGUAGE="JAVASCRIPT">
> function BoldId( id )
> {
> document.getElementById("PageNumber"+<@ARG PAGENUMBER>).style.fontWeight =
"bold";
> }
> </SCRIPT>
>
>
>
> Finally the buttons are as follows:
>
> <a href="javascript:GoToPage('1');" id='PageNumber1'
onMouseOver='window.status="Page 1" ; return true'>1</a>|<a
href="javascript:GoToPage('2');" id='PageNumber2'
onMouseOver='window.status="Page 2" ; return true'>2</a>|<a
href="javascript:GoToPage('3');" id='PageNumber3'
onMouseOver='window.status="Page 3" ; return true'>3</a>
>
>
>
> This is all work in progress so just use it as reference if it's of
interest. Of all of it I think the Bold script is the most elegant, even
though it makes the link code more complex
>
> The pagenumber arg gives the option of delivering pages by page number,
rather than record number, which I quite like
>
> My final feeling is that it would be easier to do in WiTango. It was the
generation of the page numbers that attracted me to javascript - despite the
fact that I knew I couldn't do it!
>
> Still, I learnt a bit about Javascript yesterday
>
>
>
>
>
>
> > > I posted a while ago about generating page numbers
> >> eBay-style for multiple result pages. I'd rather do
> >> this in javascript on a per-page basis than do it
> >> with Witango, and this is as far as I've got:
> >>
> >> <HEAD>
> >>
> >> <SCRIPT LANGUAGE="JAVASCRIPT">
> >> function GoToPage( id )
> >> {
> >> window.location = (
> >>
> >'http://www.bolide.co.uk/actions/image.taf?link=&start='
> >> + id);
> >> }
> >> </SCRIPT>
> >>
> >> </head>
> >>
> >> <BODY>
> >>
> >> <!----------------- nav bar starts here
> >> ------------------>
> >>
> >> <a href="javascript: GoToPage('1');">1</A> | <a
> >> href="javascript: GoToPage('11');">2</A> | <a
> >> href="javascript: GoToPage('21');">3</A>
> >>
> >> <!------------------ nav bar ends here
> >> ------------------->
> >>
> >> etc, etc
> >>
> >> What I'd like to do is to calculate the number of
> >> pages from <@TOTALROWS> / <@NUMROWS>, round this
> >> total up, then use javascript to populate the nav
> >> bar automagically with the right numbers, and
> >> calculate the record number to start from from
> >> <@NUMROWS>
> >>
> >> The id number is the page number, and the start
> >> record = ((page number x <@NUMROWS>)-(<@NUMROWS>-1))
> >>
> >> The final wrinkle would be to make the current page
> >> number bold
> >>
> >>
> >>
> >> I know I can't do the javascript - can anyone help?
> >> I'll post the completed, tested code back to the
> >> list. The final results would be applicable across
> >> the board for any dynamically-generated pages
> >>
> >________________________________________________________________________
> >> TO UNSUBSCRIBE: send a plain text/US ASCII email to
> >> [EMAIL PROTECTED]
> > > with unsubscribe witango-talk in the
> >> message body
> >
> >
> >__________________________________________________
> >Do you Yahoo!?
> >Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
> >http://mailplus.yahoo.com
> >________________________________________________________________________
> >TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> > with unsubscribe witango-talk in the message body
>
> ________________________________________________________________________
> TO UNSUBSCRIBE: send a plain text/US ASCII email to [EMAIL PROTECTED]
> with unsubscribe witango-talk in the message body
>
prevnext.taf
Description: Binary data
BODY
{
font-family: monospace;
font-size: 11px;
}
.Disabled
{
background-color: #CCC;
}
.Enabled
{
background-color: #366C8D;
color: #FFF;
}
.Group
{
width:400px;
border: 3px dashed #F00;
margin:10px;
padding:10px;
float:left;
}
p
{
clear: both;
}
<?xml version="1.0" encoding="ISO-8859-1" ?> <!DOCTYPE TAGPACKAGES SYSTEM "ctags.dtd"> <tagpackages Version="0x02000001"> <packagedef id="MyPackage"> <objects> <objectdef id="customtags" type="TCF" systemobject="true"> <name>customtags.tcf</name> <varname>customtagsobject</varname> <scope>local</scope> </objectdef> </objects> <tags> <tagdef name="listarg" objectid="customtags"> <method>process_ListArg</method> <encoding>NONE</encoding> <attrdef name="UPDATE" required="false"> </attrdef> <attrdef name="DELETE" required="false"> </attrdef> </tagdef> <tagdef name="prevnext" objectid="customtags"> <method>result_PrevNext</method> <encoding>NONE</encoding> <attrdef name="START" required="true"> </attrdef> <attrdef name="MAX" required="true"> </attrdef> <attrdef name="TOTAL" required="true"> </attrdef> <attrdef name="TYPE" required="false"> </attrdef> <attrdef name="STARTARGNAME" required="false"> </attrdef> </tagdef> </tags> </packagedef> </tagpackages>
customtags.tcf
Description: Binary data
