Re: Problems passing [SKU] with $Replace in 2.0
This WebDNA talk-list message is from 1997
It keeps the original formatting.
numero = 10941
interpreted = N
texte = Grant Hulbert wrote:> > Trevor, I'm trying to get a feel for what you're trying to do here so I can suggest alternatives that may work better. I can't quite tell yet, but I think maybe you're using $Replace in a way that it's not designed to work.Sorry, but I don't think I was clear enough with what I am trying to dowith this. This is part of the Jackson Hole site we are working on rightnow. We are setting it up so that the entire site is generated byWebCatalog and all pages have a corresponding record in the database. Weare doing this so that we can then allow our clients the ability to goin and change the text and layout of each page. So, first they go to apage that lets them search for which record they want to edit. That pageis a form based page with a $Search command. The template it returns hasthe following code (from my first email) and the [SKU] does get replacedhere> >-----------------------> >The replace code-->> >-----------------------> >> >
And the data is replaced in the database. Now is where things get tricky. We are trying to set this up, so avariety of things occur.1. The entire site can be generated on the fly so we can pass a cartthrough the whole thing.2. The entire site gets rendered, using the [WriteFile] context, so thatevery page on the site is accessible to spiders.So at this point, the record has been altered in the database, but weneed the page to be rendered. So, we want to give the user a preview oftheir page before they render it. So what I want to have happen is forthe template generated by the $Replace command to pass the SKU to thenext page to be specified in a [Search] context, which will thengenerate a preview of the page they have just created. > >-----------------------> >The corresponding code in guidemodified.tmpl-->> >-----------------------> >> >[Search db=/WebCatalog/jackson.db&eqSKUdata=[SKU]]> >[FoundItems]> >
And the data is replaced in the database. Now is where things get tricky. We are trying to set this up, so avariety of things occur.1. The entire site can be generated on the fly so we can pass a cartthrough the whole thing.2. The entire site gets rendered, using the
[writefile] context, so thatevery page on the site is accessible to spiders.So at this point, the record has been altered in the database, but weneed the page to be rendered. So, we want to give the user a preview oftheir page before they render it. So what I want to have happen is forthe template generated by the $Replace command to pass the SKU to thenext page to be specified in a
[search] context, which will thengenerate a preview of the page they have just created. > >-----------------------> >The corresponding code in guidemodified.tmpl-->> >-----------------------> >> >[Search db=/WebCatalog/jackson.db&eqSKUdata=[SKU]]> >
[founditems]> >