[Date Prev][Date Next][Thread Prev][Thread Next][Minivend by date
][Minivend by thread
]
RE: list of categories
****** message to minivend-users from "Thompson-Jordan" <Thompson-Jordan@mindspring.com> ******
I do this same thing my generating a separate database from my products
database that contains a list of the categories. Each record in this
database contains the category name and type, plus a count of the number of
items in that category.
This information only changes when the products database changes, so I
thought it was better to pre-calculate this table to speed page display.
Plus it allows me to easily do things like sub-categories based on the
category type or display the number of items in the category.
If users can add or remove records or change the category of an item, this
would not work, but that is probably rare.
Christopher Thompson
> -----Original Message-----
> From: owner-minivend-users@minivend.com
> [mailto:owner-minivend-users@minivend.com]On Behalf Of Frank Miedreich
> Sent: Friday, February 05, 1999 8:05 AM
> To: minivend-users@minivend.com
> Subject: Re: list of categories
>
>
> ****** message to minivend-users from Frank Miedreich
> <miedreich@acm.org> ******
>
> >****** message to minivend-users from Thomas Walter
> <tw@mail.itreff.de>
> >******
> >
> >First of all I have to say "whow" and of course thank you all...
> >It is great how fast questions are answered on this list.
> >
> >I did what Marius wrote, to create a list of my categories:
> >
> > <!-- Liste der Kategorien erzeugen -->
> > [search-region arg="ra=yes/di=category"]
> > [search-list]
> > [on-change category]
> > [condition][item-field category][/condition]
> > <a href="[area scan di=category/ml=3/df=yes/dl=[item-field
> >category]]">
> > <font color="#ffffff">[item-field category]</font></A><BR>
> > [/on-change category]
> > [/search-list]
> > [/search-region]
> >
> >This is done as an index on the left side of my pages. Clicking on one
> >of the created links works great, but then the list of categories is
> >only the chosen category.
> >How do I create a list that always contains all categories. (I thought
> >ra=yes would help, but it did not).
> >
> > Balu
>
>
> this may be an interaction with the surrounding search-list. Not knowing
> whether there is one, this is just a guess, but maybe you can try to
> replace the search-region with a loop search, as it does not look
> as if you
> would need the search region extensions for your index anyway.
>
> you would do
> [loop search="ra=yes/di=category"]
> [loop-change category]
> [condition][loop-field category][/condition]
> your link goes here
> [/loop-change category]
> [/loop]
>
> maybe my thinking is off, but I have not used nested searches,
> this may not
> change a thing, but it's worth a try.
>
> BTW: considering you want just the index, it may be worth creating the
> index for inclusion via an export piped through a simple perl script that
> generates the necessary tag stuff around the category field. This would be
> done only after a change to the database, so you would not start a full
> search all the time. Minivend is fast, but having it create the same thing
> over and over again seems like a decidedly microsoftian way of
> doing things.
>
> (Unless the database changes a lot of course)
>
> cheers, frank
>
> --
> Frank Miedreich
> Max-Planck-Institut fuer psychologische Forschung
>
>
> -
> To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
> email with 'UNSUBSCRIBE minivend-users' in the body to
> Majordomo@minivend.com.
> Archive of past messages: http://www.minivend.com/minivend/minivend-list
>
-
To unsubscribe from the list, DO NOT REPLY to this message. Instead, send
email with 'UNSUBSCRIBE minivend-users' in the body to Majordomo@minivend.com.
Archive of past messages: http://www.minivend.com/minivend/minivend-list