Copied to clipboard

Flag this post as spam?

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


  • Ivan 165 posts 542 karma points
    Jan 20, 2014 @ 21:49
    Ivan
    0

    Share helpers across several macros

    Hi everyone.

    There's a nice helper method that outputs paging markup:

    paging.cshtml

    @helper RenderPaging() {

     doing some magic...

    }

    How do I call the @RenderPaiging in another macro products.cshtml? 

  • Andy Butland 373 posts 2057 karma points MVP 4x hq c-trib
    Jan 20, 2014 @ 21:53
    Andy Butland
    0

    @paging.RenderPaging() should do it.  Assuming this helper lives in App_Code the "class name" is just the name of the file.

    Andy

  • Ivan 165 posts 542 karma points
    Jan 20, 2014 @ 22:11
    Ivan
    0

    Andy,

    Super! It works, thanks!

  • Amir Khan 1199 posts 2567 karma points
    Jan 21, 2014 @ 01:19
    Amir Khan
    0

    Hi Ivan,

    Where did you find the helper you're referring to?

    -Amir

  • Ivan 165 posts 542 karma points
    Jan 21, 2014 @ 16:29
    Ivan
    0

    Hi Amir.

    It has been written by our company and has nothing to do with standard Umbraco components.

  • This forum is in read-only mode while we transition to the new forum.

    You can continue this topic on the new forum by tapping the "Continue discussion" link below.

Please Sign in or register to post replies