Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
Calling all developers! We invite you to provide your input on Feature Experimentation by completing this brief survey.
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.