Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

Advanced Tab and PagetypeBuilder

Vote:
 

Hi i have a very simple question, but can't find the correct information, i am using PagetypeBuilder and want to add one property to the Advanced Tab, is this possible?

#37563
Mar 11, 2010 11:28
Vote:
 

Yes, you need to create a new class that inherits from PageTypeBuilder.Tab.

 

using EPiServer.Security;
using PageTypeBuilder;
 
namespace EPiServer.Templates.Public.Tabs
{
    public class Advanced : Tab
    {
        public override string Name
        {
            get { return "Advanced"; }
        }
 
        public override AccessLevel RequiredAccess
        {
            get { return AccessLevel.Edit; }
        }
 
        public override int SortIndex
        {
            get { return 20; }
        }
    }
}

You can then set PageTypeProperty's property Tab to typeof(Advanced).

 

[PageTypeProperty(Tab = typeof(Advanced))]
public virtual string MyProperty
{
    get; set;
}

I've also written a little guide to PageTypeBuilder that should be helpful: A developer’s guide to PageTypeBuilder. Also recommend checking out PageTypeBuilders project home page for more information and links to other blog posts.

Hope this helps.

Frederik

#37566
Edited, Mar 11, 2010 12:01
This topic was created over six months ago and has been resolved. If you have a similar question, please create a new topic and refer to this one.
* 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.