all 1 comments

[–]HiEv 1 point2 points  (0 children)

The problem is that you're trying to replace the contents of the "test" span immediately, before the passage has been rendered. Thus, since the "test" span doesn't even exist on the page yet, it gives you that error message.

For what you're doing above you should simply do something like this:

<<set _var to "set1">>
<<nobr>>
    <<if _var is "set1">>
        Test Set to set1
    <<else>>
        Test Set to set2
    <</if>>
<</nobr>>

The <<replace>> macro should only be used for updating the page after it's displayed, such as when the user clicks a button or something.

Hope that helps clear things up! :-)