<dtml-in>, batches and <dtml-unless previous-sequence-start-number>
Hello, I am attempting to build a: <<< 1 2 (3) 4 5 6 >>> style batch record control using DTML. I have gotten everything working except for the links to the first and last batches in the previous-batches and next-batches mapping sequences. <<< and >>> respectively. I am able to sucessfully test for previous-sequence-start-number in the affirmative (<dtml-if p.s.s.n>). However, a test in the negative seems to be broken (<dtml-unless p.s.s.n>). Such as in the snippet below. In other words, a hyperlink is inserted if I use <dtml-if> but not if I use <dtml-unless>. Can anyone tell me what I am doing wrong or is this a broken feature? <dtml-call "REQUEST.set('batch_number', 0)"> <dtml-in expr="SQL(q=q)" previous size=bat_size start=query_start> <dtml-in previous-batches mapping> <dtml-unless previous-sequence-start-number> <a href="<dtml-var document_id><dtml-var sequence-query>query_start=<dtml-var batch-start-number>"><<<</a> </dtml-unless> <dtml-call "REQUEST.set('current_batch_number', _['sequence-length'] + 1)"> <dtml-call "REQUEST.set('batch_number', _.int(batch_number) + 1)"> <dtml-unless sequence-start> , </dtml-unless> <dtml-if expr="batch_number >= current_batch_number - 10"> <a href="<dtml-var document_id><dtml-var sequence-query>query_start=<dtml-var batch-start-number>"><dtml-var batch_number></a> </dtml-if> </dtml-in> </dtml-in> <dtml-call "REQUEST.set('batch_number', _.int(batch_number) + 1)"> <dtml-call "REQUEST.set('current_batch_number', _.int(batch_number))"> <dtml-var current_batch_number> <dtml-in expr="SQL(q=q)" next size=bat_size start=query_start> <dtml-in next-batches mapping> <dtml-unless next-sequence-start-number> <a href="<dtml-var document_id><dtml-var sequence-query>query_start=<dtml-var batch-start-number>"><<<</a> </dtml-unless> <dtml-call "REQUEST.set('batch_number', _.int(batch_number) + 1)"> <dtml-unless sequence-start> , </dtml-unless> <dtml-if expr="batch_number <= current_batch_number + 10"> <a href="<dtml-var document_id><dtml-var sequence-query>query_start=<dtml-var batch-start-number>"><dtml-var batch_number></a> </dtml-if> </dtml-in> </dtml-in> Thanks, Derek Basch __________________________________ Do you Yahoo!? The New Yahoo! Search - Faster. Easier. Bingo. http://search.yahoo.com
Derek Basch wrote at 2003-5-26 22:25 -0700:
I am able to sucessfully test for previous-sequence-start-number in the affirmative (<dtml-if p.s.s.n>). However, a test in the negative seems to be broken (<dtml-unless p.s.s.n>).
Usually, "dtml-unless" works as it should. <dtml-unless XXXX>....</dtml-unless> is equivalent to <dtml-if XXXX><dtml-else>....</dtml-if> Dieter
In this case it does not. I have spent hours playing with it to confirm this and I feel pretty safe in saying that it is broken. I was hoping someone would have had some experience with this but I guess not. Perhaps I should submit a bug report. Thanks Dieter, Derek Basch --- Dieter Maurer <dieter@handshake.de> wrote:
Derek Basch wrote at 2003-5-26 22:25 -0700:
I am able to sucessfully test for previous-sequence-start-number in the affirmative (<dtml-if p.s.s.n>). However, a test in the negative seems to be broken (<dtml-unless p.s.s.n>).
Usually, "dtml-unless" works as it should.
<dtml-unless XXXX>....</dtml-unless>
is equivalent to
<dtml-if XXXX><dtml-else>....</dtml-if>
Dieter
__________________________________ Do you Yahoo!? Yahoo! Calendar - Free online calendar with sync to Outlook(TM). http://calendar.yahoo.com
Derek Basch wrote at 2003-5-29 08:05 -0700:
... dtml-unless broken ... Perhaps I should submit a bug report.
When you have a reproducible bug, a bug report might help to get the bug fixed. Dieter
participants (2)
-
Derek Basch -
Dieter Maurer