Welcome to Squishdot Websites Squishdot How-To Newbies
 about
 search
 post article
 Documentation
 Mailing Lists
 Bug Tracking
 Development
 Installation
 Upgrading
 Download
 admin
 rdf

 main


Inverting Search Results
How-To Posted by Prime on Thursday February 15, 12:46AM, 2001
from the dept.
I use a blank search query to implement a "List All Posts" feature. Is there any way to invert the search results, so that newest posts are listed first?

<  |  >

 

Related Links
  • Articles on How-To
  • Also by Prime
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Inverting Search Results
    by Darrick Wong on Sunday February 18, 10:46AM, 2001
    <-- cocks head in the direction of this HOWTO.

    As for reversing sort order, you just stick the word "reverse" into the <dtml-tree> tag.

    If you want a list and not a tree, substitute <dtml-in postingValues sort="blah" reverse> for the <dtml-tree> tag and close it properly.
    [ Reply to this ]
    • Re: Inverting Search Results
      by Prime on Sunday February 18, 08:39PM, 2001
      Tried (and failed) to implement that -- no comments are displayed when tree.html is accessed though the correct number is printed -- so I resorted to using a simple search query. I'm just wondering if there's a variable anywhere that governs the order of search results.

      [ Reply to this ]
      • Re: Inverting Search Results
        by Darrick Wong on Saturday April 07, 11:41PM, 2001
        Probably a little too late now, but you have to create a DTML method, not a DTML document as my HOWTO had erroneously claimed earlier. Thanks to Bjoern Clauss for pointing that out.
        [ Reply to this ]
    • Re: Inverting Search Results
      by george on Friday February 23, 03:10AM, 2001
      here's my dtml-in thing

      <dtml-in search_results size=15 reverse start=query_start>

      this makes a batch size of 15.

      this works for me fine

      [ Reply to this ]
      • Re: Inverting Search Results
        by Chris Withers on Monday March 19, 06:34PM, 2001
        Yup, that looks good to me :-)

        Anyone still having problems?

        Chris

        [ Reply to this ]
        • Re: Inverting Search Results
          by Gari Araolaza on Friday September 07, 12:42PM, 2001
          Hi Chris, (or someone else)

          What about setting Next and Previous batch links?

          I understand I should link to the search method, but what about the parameters? should I put:


          <a href=".....search?<dtml-if body>body=<dtml-var body>&</dtml-if><dtml-if author>author=<dtml-var author....


          ...and so on? Or is there a more elegant solution?


          Thanks

          Gari
          [ Reply to this ]

     
    The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Powered by Zope  Squishdot Powered
      "Any system that depends on reliability is unreliable." -- Nogg's Postulate
    All trademarks and copyrights on this page are owned by their respective companies. Comments are owned by the Poster. The Rest ©1999 Butch Landingin, ©2000-2002 Chris Withers.