Copied to clipboard

Flag this post as spam?

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


  • Pinal 14 posts 34 karma points
    Mar 13, 2014 @ 11:07
    Pinal
    0

    Macro not worked in UMF

    Hello,

             I have umbraco site and i used many macro in that and it works fine there.My problem is that when i am using those macro in UMF plugin ( currently i am using that in "View/UMFMaster.cshtml" ) its not working.Also i didn't get any error. Could anyone please Help me in that.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 13, 2014 @ 12:03
    David Brendel
    0

    Hi Pinal,

    what type of macro is it you're using? Razor, xslt, usercontrol?

    Whats the purpose of the macro?

  • Pinal 14 posts 34 karma points
    Mar 13, 2014 @ 12:21
    Pinal
    0

    Hello,

            I am using Razor macro.Its for dynamic menu.

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 13, 2014 @ 12:56
    David Brendel
    0

    Hi Pinal,

    hard to say what's going wrong without any code of the macro and how your content tree looks. The first think that i can think of is that the macro can't get any nodes to display in the menue. If there are no errors then it seems that the macro runs through and just not showing the menu.

    Can you provide a screen of your content tree and the code from the macro?

  • Pinal 14 posts 34 karma points
    Mar 13, 2014 @ 13:25
    Pinal
    0

    Hello,

             Here i am sending you screenshot of code.If you need macro code please let me know i will forward you code as well.

     

     

     

     

     

     

     

     

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 13, 2014 @ 14:46
    David Brendel
    0

    Hi Pinal,

    thanks for providing the screens. The code works on the other nodes (shope/home/searching)?

    Does the macro display anything? Some markup or something.

    Maybe its because of the .Where("Visible") Statement in your querys. This test a property in the nodes called "umbracoNaviHide". Think this property is not present in the UMF nodes. Maybe thats why no nodes are displayed.

  • Yasir Butt 161 posts 371 karma points
    Mar 13, 2014 @ 15:26
    Yasir Butt
    0

    Hi

    I think there is something wrong with first loop 

    @foreach (var item in @CurrentNode.corporate) it should be @foreach (var item in CurrentNode.Children)

     

    Yasir

  • David Brendel 792 posts 2970 karma points MVP 3x c-trib
    Mar 13, 2014 @ 16:07
    David Brendel
    0

    Hi Yasir,

    that could be the problem indeed. I think that the @CurrentNode.corporate could also be some dynamic property from the node that you can query. But yes you're right .Children makes more sense here.

  • sagar 13 posts 33 karma points
    Mar 14, 2014 @ 12:08
    sagar
    0

    hi all, thnx for replying

    no thats not a problem @CurrentNode.corporate this means that the select only node whom have template corporate

    and i have already try with the children but it gives can not bind dynamic node  this error gives

     

Please Sign in or register to post replies

Write your reply to:

Draft