Hey all,
I've got a content part that is a relation to another content item similar
to the SponsorPart in the RelationExample project. I pretty much followed
that example exactly, yet when I hit save on the content item I'm editing,
the linking field is not getting saved. In my service I can see the field
(part.Image) getting set properly here:
public void UpdateImageAttachmentForContentItem(ContentItem contentItem,
EditImageAttachment model)

        {

            var part = contentItem.As<ImageAttachmentPart>();

            if (model.ImageId != null)

            {

                part.Image = _contentManager.Get(model.ImageId.Value);

            }

            else

            {

                part.Image = null;

            }

            

        }


Yet when the editor refreshes the field is no longer set. I check in the
database and there is a record for my content part, but only the parent
content item id is set. The related content id is NULL.

What could I be doing wrong?




---
You are currently subscribed to orchard-discuss as: [email protected].
To unsubscribe send a blank email to [email protected].

Reply via email to