Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hey
I have created a simple macro with 4 parameters to be used in my templates.
param alias' (all are of property text) are :
path
width
height
alt
im my template it looks like this :
<umbraco:Macro path="[#highlightImage]" width="11" height="11" alt="11" Alias="ImagegenInserter" runat="server">umbraco:Macro>
and in my macro it looks like this
@{var item = Model.MediaById(@Parameter.path);<img src="/[email protected]&[email protected]&[email protected]&Constrain=false" alt="@Parameter.alt" />}
When loading the page i get the path and alt text out, but not the height and width(11 is just a test value ofc).
So the html looks like this :
Any ideas ?
sry it does not come out as " 11 " but
<img alt="tekst" src="/ImageGen.ashx?image=/media/59/P5010907.JPG&width=&height=&Constrain=false&Crop=resize">
Apparently it wouldnt make me use "width" and "height" as parameter alias'
works if i rename them w and h
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Simple parameter parsing from template to macro not working
Hey
I have created a simple macro with 4 parameters to be used in my templates.
param alias' (all are of property text) are :
path
width
height
alt
im my template it looks like this :
and in my macro it looks like this
When loading the page i get the path and alt text out, but not the height and width(11 is just a test value ofc).
So the html looks like this :
Any ideas ?
sry it does not come out as " 11 " but
<img alt="tekst" src="/ImageGen.ashx?image=/media/59/P5010907.JPG&width=&height=&Constrain=false&Crop=resize">
Apparently it wouldnt make me use "width" and "height" as parameter alias'
works if i rename them w and h
is working on a reply...