Well, I hope persistance pays off, I seem to be unable to edit or delete the previous attempts:
I have a page with ~15 images, each in a property: fig1; fig2; fig3; etc. I'm trying to create a macro with a parameter so I can just change the figure property for each instance I place on the template.
If I add a text parameter 'figure' to the macro, and input 'fig1' when inserting the macro into the template, plus replace 'fig1' with 'figure' in the script, it does not work:
in the script, it shows the parameter contents correctly, 'fig1' (w/o quotes), on the webpage, so I know it's getting there.
I think I've tried all the possible combinations of "" and [], plus tossing in an occasional '#' for good measure, in both the template/parameter and the script but haven't figured out the magic.
another passing parameters question - 3rd try
Well, I hope persistance pays off, I seem to be unable to edit or delete the previous attempts:
I have a page with ~15 images, each in a property: fig1; fig2; fig3; etc. I'm trying to create a macro with a parameter so I can just change the figure property for each instance I place on the template.
This razor script with no parameter works:
If I add a text parameter 'figure' to the macro, and input 'fig1' when inserting the macro into the template, plus replace 'fig1' with 'figure' in the script, it does not work:
The page shows the ImageGen 'Hello, world!' error, and the source shows no image:
However, if I put:
in the script, it shows the parameter contents correctly, 'fig1' (w/o quotes), on the webpage, so I know it's getting there.
I think I've tried all the possible combinations of "" and [], plus tossing in an occasional '#' for good measure, in both the template/parameter and the script but haven't figured out the magic.
Help!
Amazing how posting the question helps find the answer. Had to chage the script to use GetPropertyValue:
Thanks folks. My apologies again for the redundancy.
is working on a reply...