How to use Content Picker in Umbraco 5 - quick fix
This was causing me such a headache today although I am hungover ;-S sooo I thought I'd share it.
It's probably statement of the bleeding obvious for most but atleast newbies will find it.I found that the shortest way to pull in code from a content picker was the following:
How to use Content Picker in Umbraco 5 - quick fix
This was causing me such a headache today although I am hungover ;-S sooo I thought I'd share it.
It's probably statement of the bleeding obvious for most but atleast newbies will find it.I found that the shortest way to pull in code from a content picker was the following:
@Umbraco.GetDynamicContentById(DynamicModel.ContentPickerProperty).SomePropertyFromContentPage
Hope this helps
Thanks, Paul Stoker. :)
I was implemented this way:
if (CurrentPage. teaserBox != "string$_(null)")
{
var teaserBoxStringId = CurrentPage.teaserBox as string;
Content teaserBoxNode = Hive.Content.GetById(teaserBoxStringId);
// Do something with teaserBoxNode ...
}
PS. "teaserBox" is a name of property by using content picker data type in CurrentPage.
Cheer.
Hi LordToro,
Great for example :)
Can you expain about using media picker and get url in macro patial?
Thanks a lot,
PT
is working on a reply...