[ic] conditional surrounded reparse breaks

Peter peter at pajamian.dhs.org
Thu Nov 4 09:58:42 UTC 2010


On 04/11/10 09:27, Paul Jordan wrote:
>  
> I have a situation where I conditionally serve page content,
> alternatively serving and different page via an [include]. I realize I
> can use a bounce, but I do this in this particular page so the page name
> stays the same and the user is unaware they are not seeing what they are
> supposed to be seeing. Don’t comment on the “what?”, it’s a very odd
> situation with a third party that I have very limited access to. Simplified:
>  
> [tmp foo][/tmp]
>  
> [if scratch foo]
>     [include pages/existingpage.html]
> [else]
>  
>     regular page content
>     [strip reparse=0]
>         <!--[if IE]>
>             test 1
>         <![endif]-->
>     [/strip]
>  
> [/else]
> [/if]
>  
>  
> The problem is that the [strip] surrounded IE conditionals (which
> usually work) don’t if it is within a condition itself – the last
> “[/if]” gets printed to the page. I am guessing this is an interpolation
> order issue. Anybody know of a way I can get this scenario to work?

There are a few different ways.  One is to stick the [if IE]... block
into a scratch before the [if] block and then reference it later,
another is to put it in an include block, another is to write a small
usertag that inserts the IE-specific tags, anotehr is to rewrite your
logic so it doesn't use the [if] tag, there are loads of possibilities here.


Peter




More information about the interchange-users mailing list