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 543 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 422 posts 2334 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 543 karma points
    Jan 20, 2014 @ 22:11
    Ivan
    0

    Andy,

    Super! It works, thanks!

  • Amir Khan 1282 posts 2739 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 543 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.

Please Sign in or register to post replies

Write your reply to:

Draft