Ask a Question related to Coldfusion - Advanced Techniques, Design and Development.

  1. #1

    Default NUMBERING

    I have recently created a search interface and using Verity. I have indexed
    several directories on the server, HOWEVER, there were certain directories that
    I didnt want to be searched. I couldn't figure out how to do that, so I decided
    to include a cfif statement on the results page which states if the url does
    not contain the name of the directory, then show results:

    <cfif URL DOES NOT CONTAIN "newsletter">
    #currentRow#. Document: <a
    href="#XOSResults.URL#">#GetFileFromPath(Key)#</A>
    <br>
    <!--- title for files --->
    Document Title (if any): #Title#
    <br>
    <!--- summary--->
    Summary: #Summary#<br>
    <!--- score --->
    Score: #Score#<br><br>
    </cfif>

    The only problem is the numbering gets messed up because some of the rows are
    not being displayed because the directory path contains the newsletter
    directory and therefore I might get :
    1.fkdfjkdf
    3. fldjfd
    4. ldjflkd
    8. ldjfldj

    Is there anyway at all for me to force the numbering? Help! It seems like it
    should be simple but i've tried many different things with cfset and nothing
    works.

    TBJ Guest

  2. Similar Questions and Discussions

    1. Numbering Chapters
      I am trying to make a report in InDesign. I would like to be able to number the chapters and sub-chapters. Example: 1. chapter Family 1.1 chapter...
    2. Numbering paragraphs!
      1. I have 15 paragraphs and I want it to be numbered or selected by a circle or sth like this. How can I do it automatically? 2. How can I count...
    3. Auto numbering
      When will indesign have auto numbering? I just finished a 300 page guitar book (www.sheetsofsound.net) which used Chapter.ExerciseNum.Page in the...
    4. Bates numbering
      I would like to add Bates numbers (an overall numbering system for multiple documents) to batches of pdf documents. How can I do this?
    5. bullets and numbering
      Is it possible to automate the numbering of paragraphs--a numbered list--using a standard outline-type hierarchy, or is the only solution to type...
  3. #2

    Default Re: NUMBERING

    You'll have to roll your own counter. Since you're spinning through a result
    set and ignoring some rows, you can't depend on the CURRENTROW variable for a
    numbered list. Try this: <cfset mycounter = 0> <cfoutput query='XOSResults'>
    <cfif URL DOES NOT CONTAIN 'newsletter'> <cfset mycounter = mycounter+1>
    #mycounter#. Document: <a href='#XOSResults.URL#'>#GetFileFromPath(Key)#</A>
    <br> <!--- title for files ---> Document Title (if any): #Title# <br> <!---
    summary---> Summary: #Summary#<br> <!--- score ---> Score: #Score#<br><br>
    </cfif> </cfoutput> HTH,

    philh Guest

  4. #3

    Default Re: NUMBERING

    Thanks Phil, it worked like a charm. Now my other small issue is that the
    RecordCount variable I am using to display the number of documents returned is
    in correct. Is there a way to take the last counter variable number and
    incorporate it as the total number of documents returned to the page?

    Thanks so much.

    TBJ Guest

  5. #4

    Default Re: NUMBERING

    I suppose you could do a Query of Queries and select the recordcount for
    records that match your criteria. So, Get the Verity result; Query it for
    the criteria ('URL NOT LIKE '%newsletter%'') (I'm not sure of QofQ's
    capabilities here :-| ); store the recordcount of that query to your total
    variable (or just display). If this doesn't work you'll have to spin through
    the Verity recordset twice: once to get your record count and once to display
    the pertinent results. HTH,

    philh Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139