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
Hi guys, attempting to use a content picker in a macro to embed something in RTE, ive been trying stuff like @Model.MacroParameters["story"];
@Model.MacroParameters["story"];
And I think its good, but i am getting umb://document/4d9e2aff192e409c845e808d3f4ea5fd;
umb://document/4d9e2aff192e409c845e808d3f4ea5fd;
My entire macro partial view is only this currently:
@inherits Umbraco.Web.Macros.PartialViewMacroPage @Model.MacroParameters["story"];
Not sure what the above is, so how would i turn that into something I can access properties of the item, such as images, title, dates etc.
Thanks!
var storyId = Model.MacroParameters["story"]; var storyContent = Umbraco.TypedContent(storyId); @storyContent.Name @storyContent.Url @storyContent.Id @storyContent.GetPropertyValue("yourCustomProperty")
fix^
It doesn't work for me.
I have:
var moreId = Model.MacroParameters["more"]; var more = Umbraco.TypedContent(moreId);
and more just returns null
more
I am using Umbraco 7.6.0
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Macro with Content Picker parameter
Hi guys, attempting to use a content picker in a macro to embed something in RTE, ive been trying stuff like
@Model.MacroParameters["story"];
And I think its good, but i am getting
umb://document/4d9e2aff192e409c845e808d3f4ea5fd;
My entire macro partial view is only this currently:
Not sure what the above is, so how would i turn that into something I can access properties of the item, such as images, title, dates etc.
Thanks!
fix^
It doesn't work for me.
I have:
and
more
just returns nullI am using Umbraco 7.6.0
is working on a reply...