Passing a variable to a PartialViewMacroPage

I have a macro tied to a PartialViewMacroPage and I have parameters set at the macro level that I’m trying to get the value from in the PartialViewMacroPage.

When I add the macro using the rich editor, I’m setting parameters.

I can get as far as identifying if it’s there but it trying to access the value and it comes up empty.

@inherits Umbraco.Web.Macros.PartialViewMacroPage


	 var galParam = Model.MacroParameters["galleryWidth"];






<script type="text/javascript">

	       var test = "@galParam"  //empty

	</script>

If I check the html in the rich editor I can see the parameter values present and the values I set.

<div class="umb-macro-holder mceNonEditable"><!-- <?UMBRACO_MACRO macroAlias="PhotoGallery" delay="3500" galleryWidth="600" /> --> <ins>
<div class="mod_gallery_container">
<div id="mod_gallery"></div>
<div id="galleryTitleBar"></div>
</div>
</ins></div>

What else do I need to check or add to make this work?


This is a companion discussion topic for the original entry at https://our.umbraco.com/forum/71920-passing-a-variable-to-a-partialviewmacropage