Quantcast
Channel: Developer to developer
Viewing all articles
Browse latest Browse all 9076

Custom property on a page

$
0
0

So I am letting users authenticate from an external api. When these users create a page I just have CreatedBy in the currentPage instance. 

What I am trying to do is to add a property to the page which will be fullfilled by the PageCreatedEvent programtically and not be allowed to tempered with from te admin view.

I have this 

        public void Initialize(InitializationEngine context)
        {
            var events = context.Locate.ContentEvents();
            events.CreatedContent += CreatedContent;
        }
        private void CreatedContent(object sender, ContentEventArgs e)
        {
            var articlePage = e.Content as ArticlePage;
            if (articlePage != null)
            {
                // TODO: ...
            }
        }

Is there a way that I can create a property and make it hidden on the page edit page? And then how do I store it programmitcally? 

Thanks


Viewing all articles
Browse latest Browse all 9076

Trending Articles