[Date Prev][Date Next][Thread Prev][Thread Next][Interchange by date
][Interchange by thread
]
[ic] interchanging data between page and include
>
> hi all,
> i'm probably just being thick but at the moment unable to figure the
> following:
> if i have a flypage with the code
> [fly-list code="data session arg"]
> [item-code]
> [/fly-list]
>
> that works fine and then change it to
> [fly-list code="data session arg"]
> [item-code]
> [include file="templates/mytemplate"]
> [/fly-list]
>
> with mytemplate being something along the lines of
> [item-code]<br />
> [item-field description]
>
> why do the parameters not arrive/ are the tags left untouched?
> or what would be even more interesting, how could i get the template to play
> with the values that the including file has got access to?
>
> any pointers would be greatly appreciated as i am pretty lost on this one.
>
First, I'll assume that the "data session arg" was a typo and
you know about the missing "[" and "]". :-)
To answer your question, the [item-*] tags are "subtags" of the
[fly-list] tag. Once you get into your [include], you are
inside a completely new tag and out of the reach of the subtag
parser.
You could do one of two things:
1) Move the [fly-list] tag into the included file.
2) Don't use [include]. Read the file into a variable in
catalog.cfg and use __MYTEMPLATE__ on the page instead.
(I think that'll work). In catalog.cfg:
Variable MYTEMPLATE <templates/mytemplate
--
_/ _/ _/_/_/_/ _/ _/ _/_/_/ _/ _/
_/_/_/ _/_/ _/ _/ _/ _/_/ _/ K e v i n W a l s h
_/ _/ _/ _/ _/ _/ _/ _/_/ kevin@cursor.biz
_/ _/ _/_/_/_/ _/ _/_/_/ _/ _/