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

 main


Inline searching for articles in rightboxes
Squishdot Posted by Mike Renfro on Wednesday November 22, 03:26PM, 2000
from the documentation-is-good dept.
I wanted a slightly more Slashdot-style feel to the rightbox methods, particularly the ability to display a list of articles in a section in the rightbox (inline). Below I've listed steps I've taken to accomplish this.

By default, we only have the ability to search for the appropriate articles and have the results pop up in a separate page view. A similar problem was posed in this article, but there weren't any good answers there. So, here are my changes to a Debian-standard Squishdot 0.7.1 installation:

  1. Though this step is technically optional, I started by changing all the rightbox methods into rightbox documents. The only reason for this change was to factor out some common content, specifically the instructions on how to submit a Feature, RFC, or Review article. By adding a 'title_prefix' property to each rightbox document, I was able to customize the instructions for each box.

    An example rightbox (listing "Lessons Learned"-type documents for a group's project records) is as follows:

    <b><dtml-var title></b> is <dtml-var site_name>'s section for discussing improvements to processes.

    <p><dtml-var how_to_submit>
    <dtml-var articles_in_section>
    <p align=center><dtml-var search_this>
  2. The how_to_submit method included contains:
    If you wish to create a <b><i><dtml-var title></i></b> entry, just <a href="addPostingForm">submit an article</a> and prefix its title with <b><dtml-var title_prefix>:</b>

    <p>Then you can send <A href="mailto:<dtml-var admin_address url_quote>"><dtml-var admin_name></A> an email to add your <dtml-var title_prefix> to this section.
  3. articles_in_section (the inline search similar to slashbox listings):
    <dtml-call "REQUEST.set('title',title_prefix)">
    <dtml-call "REQUEST.set('meta_type','Article')">
    <p><dtml-var list_articles>
  4. list_articles does all the catalog work (my squishdot site is called "Discussion"). It lists the most recent 5 articles to be posted into a particular box category:
    <dtml-in Discussion size=5 start=query_start sort=bobobase_modification_time reverse>
    <div class=indented><a href="<dtml-var id>"><dtml-var title></a> (<dtml-var bobobase_modification_time fmt="%D">)<br></div>
    </dtml-in>
  5. search_this is simply a replacement for the search link embedded into the default rightbox title bar:
    <a href="search?title=<dtml-var title_prefix>&op=articles">More <dtml-var title>...</a>

Though this is a working solution, it's definitely not optimal. If anyone has suggestions for improvement, please reply below.

<  |  >

 

Related Links
  • Articles on Squishdot
  • Also by Mike Renfro
  • Contact author
  • The Fine Print: The following comments are owned by whoever posted them.
    ( Reply )

    Re: Inline searching for articles in rightboxes
    by Darrick Wong on Monday November 27, 09:56PM, 2000
    Have you a demonstration of this?
    [ Reply to this ]
    • Re: Inline searching for articles in rightboxes
      by Mike Renfro on Tuesday November 28, 03:12PM, 2000
      No, not on any public sites at this time. Step 4 is the only crucial part of the inline search ability, everything else ties into my attempts to factor out common content in the rightboxes.

      I've attached a screenshot of the results, though.

      Click to download attachment ll.jpg
      16KB (17354 bytes)

      [ Reply to this ]
      • Re: Inline searching for articles in rightboxes
        by Dave Bristol on Friday September 19, 10:12AM, 2003

        Looks good, and I really appreciate you're work in putting this together. However, I have NO idea (based on the above info.) how to put it together. Do you think you could have pity on a Zope newbie and give a little more detail as to the layout of this?

        I was particularily confused as to the methods-to-documents part. After that, I think I could actually muddle through the rest of it.

        Thanks in advance for anything you can offer, and thanks again for posting this info.!


        [ 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.