Macro $xcontext.action wrong stats in inline edit mode


I want to write a macro, show different context between edit and view mode. In view mode I have HTML to display. If I use the macro just with the normal fullpage editor, everything works fine. But when a user press the “edit” button and it’s change to the inline editor. The variable “$xcontext.action” keep the state “view” and the html content is not shown at all.

here my code shorten to the essential part:

#if("$xcontext.action" == "view")
      some html code
    rendering not supported!

When output $xcontext.action direct over the if condition, it’s stay at “view”. In the above example the whole macro is then show nothing in the inline editor mode.

How can I catch this case and maybe still presenting the else block?

Thanks for support.

Yes, this is something we now need to improve with the introduction of the inplace editing… It used to work but not anymore. We need to document it.

For now, please check Check if in-place editing is active - #4 by mflorea


1 Like