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

Try our conversational search powered by Generative AI!

How do I organize the New Page groups

Vote:
 

Hey,

I have divided all mye page types into a lot of different groups, like articles, multimedia etc. and the way it is listed out seems to be based on "first made bottom row" if that makes any sense. I would like to either have it alfabetic or some sort of sort index.

Do anybody know how to manipulate it?

#73399
Jul 18, 2013 10:33
Vote:
 

Yes there is a way. This is how i do it:

I have a class PageOrder (and also for blocks a class BlockOrder)

public class PageOrder
{
    public const int Home = 1;
    public const int SomePage = 10;
    public const int SomeOtherPage = 20;
    public const int AndSoForth = 30;
}

    

Then i annotate my PageType with the following (HomePage as example),

[ContentType(
    DisplayName = "Home",
    GUID = "someGuid", 
    Description = "someDescription",
    AvailableInEditMode = true,
    GroupName = ContentGroupNames.General,
    Order = PageOrder.Home)]
[ImageUrl("~/someFolder/Home.png")]
public class HomePage : PageData
{
}

You can see the line Order = PageOrder.Home . This is the magic.    

It's very handy to have the class PageOrder since you can quickly see all the pages you have and the sorting they have between them. (instead of having to look at each individual pagetype class)

I'm, however, not certain how the Order is taken into account together with GroupName, but it seems groups are ordered somehow by the PageOrder attribute.

Good luck and greetings, Martijn

#73409
Edited, Jul 18, 2013 15:51
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* 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.