Try our conversational search powered by Generative AI!

Alloy Training Question. IContent Section property

H F
H F
Vote:
 

Hello everyone,

I am going through the training pdf for the epi server. Have some question, may be someone can answer.

There is a class created 'defaultPageViewModel.cs':

Snippet

public class DefaultPageViewModel<>T> : IPageViewModel<>Twhere T : SitePageData
    {
        public DefaultPageViewModel(T currentPage)
        {
            CurrentPage = currentPage;
            Section = currentPage.ContentLink.GetSection();
        }
 
        public T CurrentPage { getset; }
        public IContent Section { getset; }
    }

My question:
I understand why we need the property CurrentPage in that IPageViewModel interface.
But what is for IContent Section property?

And why we set it up like =
currentPage.ContentLink.GetSection();

what the section are we talking about?



thank you very much for your help,
HF




#188023
Feb 08, 2018 22:36
Vote:
 

As far a I remember from Alloy - section points to parent page of the current content (one of the anchestors) which is 1st level child of the start page. In order to draw submenu navigation.

#189718
Mar 23, 2018 10:09
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.