London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
AI OnAI Off
London Dev Meetup Rescheduled! Due to unavoidable reasons, the event has been moved to 21st May. Speakers remain the same—any changes will be communicated. Seats are limited—register here to secure your spot!
I think, I've found the decision:
var page = repository.Get<InfoPage>(publishedPage.ContentLink) as InfoPage;
var lastval = page.InfoAddress;
Dear EpiServer Team, please help.
I have a page InfoPage with the fields InfoAddress, ....
public class InfoPage : BasePage
{
public virtual string InfoAddress { get; set; }
public virtual string InfoAddress1 { get; set; }
public virtual string InfoAddress2 { get; set; }
}
When I save content It's necessary to check, was the field InfoAddress chenged from the last publish?
I found information about how to get the version of the page
var versionRepository = ServiceLocator.Current.GetInstance<IContentVersionRepository>();
ContentVersion publishedPage = versionRepository.LoadPublished(currentPage.ContentLink);
But how to get the last published version of the field InfoAddress I don't know.
Please, help.
Thank you in advance.