Re: Search Command, multiple dbs, etc. --still confused
This WebDNA talk-list message is from 2000
It keeps the original formatting.
numero = 30872
interpreted = N
texte = Mike--Thanks again for taking some time with me. I tried removing the search command onPeople.tpl and using only the [founditems] context. Now I get an error message: Error:No Search Context Found. Ignoring [FOUNDITEMS] contextWhat next?Mike Davis wrote:> If you use the command style links, then remove the [search] command on> People.tpl and simply use the [founditems] loop. When you use a command> style link, the whole page is assumed to have a [search] command wrapped> around it so all you need is the [founditems] loop wherever you want your> search results.>> Mike>> > Thanks for your reply Mike. However, I'm still quite confused. I tried> > using a link like you suggested on my Results.tpl page and leaving the> > [search] context in my People.tpl file but it didn't return anything.> >> > If I am to use the command style links (as below) then how should I> > modify my People.tpl page?> >> > I understand the need to pass the criteria to the People.tpl page. I> > don't see how the link you offered does this. I'm not too sure of how> > forms work. Does your suggestion involve a form that needs to be> > accounted for in People.tpl?> >> > Thanks.> >> > -------- Original Message --------> > From: Mike Davis
> > Subject: Re: Search Command, multiple dbs, etc.> > To: (WebCatalog Talk)> >> > Since you are using a search context on the People.tpl page, it doesn't> > make> > sense to construct *command* style links. Change your links to> > something> > like [Author1] and it should> > work. Just remember, you don't want to mix context and command syntax,> > unless you are using the context independently of the command, which in> > this> > case you are not. In order for [Author1] to be a valid variable on the> > People.tpl page, it must be passed to it in a form or link. You are> > passing> > a search command with a variable named eqAuthor1data, which is not the> > same> > thing. If you want to use a command, you don't use the [search] context> >> > on> > the results page. If you want to use a [search] context on the results> > page, you don't use command syntax in your link, but instead make sure> > you> > pass the necessary variables so that the [search] context works.> >> > Mike> >> >>> >>> >> Can somebody clue me in as to why my search commands below do not> > return> >> any data on my People.tpl page.> >>> >> My Results.tpl page yields a list of books with a list of authors &> >> editors hyperlinked to a People.tpl page (which comes up empty). The> >> author/editor name on the Results.tpl page comes from my products.db.> > I> >> want the user to then click on the hyperlinked name (from products.db)> >> >> and return a a People.tpl page that pulls data (bio, image, contact> >> info, etc.) from a people.db based and the author/editor field data> >> hyperlinked on the Results.tpl page from the product.db.> >>> >> In other words, I've got two dbs --one for products, one for people.> >> The products Results page yields a hyperlinked author name that when> >> clicked should yield a people results page that presents data from the> >> >> people.db. The products db has fields for authors/editors 1-4, the> >> people db has only one name field: Author1. Any hyperlinked> > author1-4> >> or editor 1-4 from products should search for matching records in the> >> Author1 field in people.db.> >>> >> Here are my search commands from the product results page, and below> >> that is my People.tpl page.> >>> >> >>> > HREF=People.tpl?command=search&db=fitpeople.db&eqAuthor1data=[Author1]>[Auth> >> >> or1]> >>> >> >>> > HREF=People.tpl?command=search&db=fitproducts.db&eqAuthor1data=[Author2]>[Au> >> >> thor2]> >>> >> >>> > HREF=People.tpl?command=search&db=fitproducts.db&eqAuthor1data=[Author3]>[Au> >> >> thor3]> >>> >> >>> > HREF=People.tpl?command=search&db=fitproducts.db&eqAuthor1data=[Author4]>[Au> >> >> thor4]
> >>> >> >>> > HREF=People.tpl?command=search&db=fitpeople.db&eqAuthor1data=[Editor1]>[Edit> >> >> or1]> >>> >> >>> > HREF=People.tpl?command=search&db=fitpeople.db&eqAuthor1data=[Editor2]>[Edit> >> >> or2]> >>> >> >>> > HREF=People.tpl?command=search&db=fitpeople.db&eqAuthor1data=[Editor3]>[Edit> >> >> or3]> >>> >> >>> > HREF=People.tpl?command=search&db=fitpeople.db&eqAuthor1data=[Editor4]>[Edit> >> >> or4]> >>> >> ________________________________________________> >>> >> People.tpl> >>> >> > >> > >> > >> FIT People Detail> >> > >>> >> [include file=header.htm]> >> > >>
> >>> >> [search db=fitpeople.db&eqAuthor1data=[Author1]]> >> [founditems]> >> > >>> >>
> >>> >>> >> Press your browser's "Go Back" button to see the page you> > just> >> came from,
> >> or return to the Search by> > Category> >> Page> >> > >>> >> > >>