Copied to clipboard

Flag this post as spam?

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


  • Sunshine Lewis 31 posts 140 karma points c-trib
    Jun 25, 2014 @ 23:24
    Sunshine Lewis
    0

    Macro created without parameters

    I installed EZSearch in 7.1.4 and the macro was created but I couldn't get it to recognize the parameters. I was passing them via RenderMacro as follows.

    @Umbraco.RenderMacro("ezSearch", new { pageSize = 3, rootContentNodeID = 1819, searchFields = "pageTitle, nodeName, bodyText, summary, metaDescription", searchFormLocation = "none" })
    

    Turns out, installing the package created the macro but did not actually define the parameters.

    To get my parameters to work, I had to go into Developer > Macros > ezSearch and add the macro parameters. I figured out the correct aliases and types via the code in ezSearch.cshtml and the documentation. Beware, the aliases are case sensitive! This is what it looked like when I finished.

    Macro Parameters for ezSearch

  • 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