[ic] Included file in flypage.html not parsing

Daniel Davenport ddavenport at newagedigital.com
Tue Jul 6 22:53:07 EDT 2004


> -----Original Message-----
> From: interchange-users-bounces at icdevgroup.org
> [mailto:interchange-users-bounces at icdevgroup.org]On Behalf Of the OnE
> Sent: Tuesday, July 06, 2004 9:01 PM
> To: interchange-users at icdevgroup.org
> Subject: [ic] Included file in flypage.html not parsing
>
>
>
>
> I'm trying to slice the code within my flypage.html
> and just use [include file] to make part of the code
> available when needed.. Is this solution optimal or
> not
> ? Any other? Another problem with this style of coding
> is....  [item-code] tags within the included file are
> not parsed ... they are printed as is ( plain tag )
>
> File: flypage.html
> --------------------
>  [if cgi ostep eq "1"]
>
>      [include pages/fp-step-1 interpolate=1]
>
>  [elsif cgi ostep eq "2"]
>
>      [include pages/fp-step-2 interpolate=1]
>
>  [/elsif]
>  [/if]
>
>
> File: fp-step-1
> -------------------------------
> Step 1
> <br>
> item code: [item-code]
>
>
> File: fp-step-2
> -------------------------------
> Step 2
> <br>
> item code: [item-code]
>

from what i've seen, the [PREFIX-tags] are parsed before the other tags in
the loop are (presumably so that tags like [page [item-code]] will work).
At the time that the [item-code] tag would be parsed, the [include] hasn't
happened yet...so the contents of the included file wouldn't be checked for
an [item-code].

One workaround would be to set a scratch variable and use it instead, like
so...

[tmp item][item-code][/tmp]
[if cgi ostep eq "1"]
 [include pages/fp-step-1]
[elsif cgi ostep eq "2"]
 [include pages/fp-step-2]
[/elsif]
[/if]
(the include tag interpolates by default; interpolate=1 probably isn't
needed.)

the two included pages could then use [scratch item] instead of [item-code].




More information about the interchange-users mailing list