Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • K.Garrein 164 posts 629 karma points
    Sep 07, 2017 @ 13:55
    K.Garrein
    0

    Macro not working in grid layout RTE

    Hey all.

    Umbraco version 7.6.3 assembly: 1.0.6361.21154

    I have a macro that just does a simple logged in check and then should display "Allowed" or "Not allowed".

    When I insert the macro in the grid layout as a macro, it works fine.

    When I insert the macro in a RTE in the grid layout, then it doesn't work... I'm pretty sure I have seen that work before, any ideas as to why it wouldn't work?

    See following screenshot (green is macro in grid layout, red is same macro in RTE in grid layout): enter image description here

    The code:

    @inherits Umbraco.Web.Macros.PartialViewMacroPage
    @{
        var loginStatusModel = Members.GetCurrentLoginStatus();
    
        if( loginStatusModel.IsLoggedIn )
        {
            <p>Allowed</p>
        }
        else
        {
            <p>Not allowed</p>
        }
    }
    
  • K.Garrein 164 posts 629 karma points
    Sep 07, 2017 @ 14:13
    K.Garrein
    0

    Is this the same issue? http://issues.umbraco.org/issue/U4-6206

    Thanks.

  • K.Garrein 164 posts 629 karma points
    Sep 07, 2017 @ 14:54
    K.Garrein
    101

    This workaround described on the above issue page solved my problem: https://gist.github.com/rasmuseeg/a1b3deed488e544ccc62

  • Rune Grønkjær 1372 posts 3103 karma points
    Oct 24, 2018 @ 12:52
    Rune Grønkjær
    0

    How is this even a problem? Thanks for the solution. Still a problem in v 7.12.3

  • Jeroen Oostwouder 104 posts 300 karma points
    Jul 14, 2020 @ 14:08
    Jeroen Oostwouder
    0

    Well, hold on to your hat... it still is in 7.14

Please Sign in or register to post replies

Write your reply to:

Draft