MobyDog
09/25/2023, 10:46 AMcs
Model.Value<SiteBuilderSEOMeta>("titleAndDescription").Title = strTitle;
Model.Value<SiteBuilderSEOMeta>("titleAndDescription").Description = theArticle.Value<String>("metaDescription");
IPublishedContent newsOpenGraphImage = null;
if (theArticle.Value<IPublishedContent>("newsImage") != null)
{
newsOpenGraphImage = theArticle.Value<IPublishedContent>("newsImage");
}
<div>image: @newsOpenGraphImage.ToString()</div>
//does not work
Model.Value<IPublishedContent>("openGraphImage") = newsOpenGraphImage;
Is this possible? I found this page: https://docs.umbraco.com/umbraco-cms/v/10.latest-lts/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3#add-values-programmatically but to tell the truth I don't know how to implement this with what I haveJemayn
09/25/2023, 11:05 AMMobyDog
09/25/2023, 11:23 AMcs
IPublishedContent newsOpenGraphImage = null;
if (theArticle.Value<IPublishedContent>("newsImage") != null)
{
newsOpenGraphImage = theArticle.Value<IPublishedContent>("newsImage");
}
IPublishedContent nodeOpengGraphImage = Model.Value<IPublishedContent>("openGraphImage");
nodeOpengGraphImage = newsOpenGraphImage;
MobyDog
09/25/2023, 3:05 PMMike Chambers
09/25/2023, 4:23 PMUmbraco.MediaPicker3
for your prop editor without multiple.. https://docs.umbraco.com/umbraco-cms/fundamentals/backoffice/property-editors/built-in-umbraco-property-editors/media-picker-3#multiple-disabled-without-modelsbuilderMobyDog
09/25/2023, 4:51 PMA hub and casual space for you to interact with fellow community members and learn more about Umbraco!
Powered by