[ic] active metatag question
kevin at cursor.biz
Fri Feb 25 21:22:11 EST 2005
AquariumPlants.com Webmaster [del at aquariumplant.com] wrote:
> > > __Metafirst__ [tmp][scratchd MetaDescription][/tmp] __Metalast__
> > >
> > I suspect that you're not trying to set anything at all - you're just
> > trying to display a scratch value. If that's the case then remove
> > the [tmp] and [/tmp] parts from the above and just let [scratchd] do
> > its work.
> Well, I tried that and unlike the title line it returns only
> "category::product::description" and not the actual contents of that
> field. I'm at a loss as to why Interchange is trying to treat it as flat
> text instead of a db call. I set the MetaDescription entry under
> variables in the hidden admin tables as a database entry. I'm still
> scratching my head as to why I scratchd ins't pulling it correctly.
[scratchd] will display the content of a scratch variable and then
delete it. [scratch] will do the same but leave the content intact.
For either of those to work, you first have to fill the scratch with
some sort of content. You can do that using the [tmp] or [set] tag
(also available are [seti], [tmpn] and various other methods, by the
[set foo]This is a test[/set]
The first line will set the scratch. The second will display and delete.
Note that the scratch value is returned verbatim. There is no processing
going on behind the scenes. If you want a value to be looked up in
the database then you should use the [data] tag or something similar.
[tmp bar][data table="products" column="description" key="SKU123"][/tmp]
Of course, you don't need to set a scratch variable if you just want
to display the result immediately, and not store it. The point is that
if you want something to be looked up then you must code your page that
You will find all of the tags mentioned in this article here:
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin at cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/
More information about the interchange-users