Class PageSorterHelper
This class and its members are reserved for internal use and are not intended to be used in your code.
Inheritance
Inherited Members
Namespace: EPiServer.Util
Assembly: EPiServer.dll
Version: 11.20.7Syntax
[Obsolete("This class is no longer in use and will be removed in a future release. No replacement will be provided.")]
public class PageSorterHelper
Constructors
PageSorterHelper()
Default constructor. Calls constructor with dependencies where dependecies are fetched from IOC container.
Declaration
public PageSorterHelper()
PageSorterHelper(IContentRepository, IContentProviderManager)
Constructor with dependencies
Declaration
public PageSorterHelper(IContentRepository contentRepository, IContentProviderManager contentProviderManager)
Parameters
| Type | Name | Description |
|---|---|---|
| IContentRepository | contentRepository | |
| IContentProviderManager | contentProviderManager |
Methods
ChangeSortRuleToIndexKeepingOrder(PageData)
Will change the property PageChildOrderRule to sort by index and then publish that page using ForceCurrentVersion.
Declaration
[Obsolete("Use instance method public void ChangeSortRuleToIndexMaintainOrder(PageData page, AccessLevel access) instead.", false)]
public static void ChangeSortRuleToIndexKeepingOrder(PageData page)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort rule on. |
Remarks
Since this function will re-publish the pages, the currently logged in user will need publish access to any changed pages. Designed to use together with the drag and drop sorting in the edit tree.
ChangeSortRuleToIndexKeepingOrder(PageData, AccessLevel)
Will change the property PageChildOrderRule to sort by index and then publish that page using ForceCurrentVersion.
Declaration
[Obsolete("Use instance method public void ChangeSortRuleToIndexMaintainOrder(PageData page, AccessLevel access) instead.", false)]
public static void ChangeSortRuleToIndexKeepingOrder(PageData page, AccessLevel access)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort rule on. |
| AccessLevel | access | The access level needed to save the page. |
Remarks
Designed to use together with the drag and drop sorting in the edit tree.
ChangeSortRuleToIndexKeepingOrder(PageData, AccessLevel, IContentRepository)
Will change the property PageChildOrderRule to sort by index and then publish that page using ForceCurrentVersion.
Declaration
[Obsolete("Use instance method public void ChangeSortRuleToIndexMaintainOrder(PageData page, AccessLevel access) instead.", false)]
public static void ChangeSortRuleToIndexKeepingOrder(PageData page, AccessLevel access, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort rule on. |
| AccessLevel | access | The access level needed to save the page. |
| IContentRepository | contentRepository | The IContentRepository to use |
Remarks
Designed to use together with the drag and drop sorting in the edit tree.
ChangeSortRuleToIndexMaintainOrder(PageData, AccessLevel)
Will change the property PageChildOrderRule to sort by index and then publish that page using ForceCurrentVersion.
Declaration
public virtual void ChangeSortRuleToIndexMaintainOrder(PageData page, AccessLevel access)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort rule on. |
| AccessLevel | access | The access level needed to save the page. |
Remarks
Designed to use together with the drag and drop sorting in the edit tree.
GetIndex(PageData, Int32, Boolean)
Gets the index of the sort. Internal use only.
Declaration
public virtual int GetIndex(PageData sourcePage, int sortIndex, bool pageIsAddedToNewCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | sourcePage | The source page. |
| System.Int32 | sortIndex | Index of the sort. |
| System.Boolean | pageIsAddedToNewCollection | if set to |
Returns
| Type | Description |
|---|---|
| System.Int32 | New index of the source page |
GetNextIndex(ContentReference)
Gets the next sort index for a page
Declaration
public virtual int GetNextIndex(ContentReference parentLink)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentReference | parentLink | Parent page |
Returns
| Type | Description |
|---|---|
| System.Int32 | 100 if the sort order isn't Index, otherwise the the last page's sort index + 100 |
GetNextSortIndex(ContentReference, IContentRepository)
Gets the next sort index for a page
Declaration
[Obsolete("Use instance method GetNextIndex(ContentReference parentLink) instead.", false)]
public static int GetNextSortIndex(ContentReference parentLink, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| ContentReference | parentLink | Parent page |
| IContentRepository | contentRepository | The IContentRepository to use |
Returns
| Type | Description |
|---|---|
| System.Int32 | 100 if the sort order isn't Index, otherwise the the last page's sort index + 100 |
GetNextSortIndex(PageReference)
Gets the next sort index for a page
Declaration
[Obsolete("Use instance method GetNextIndex(ContentReference parentLink) instead.", false)]
public static int GetNextSortIndex(PageReference parentPage)
Parameters
| Type | Name | Description |
|---|---|---|
| PageReference | parentPage | Parent page |
Returns
| Type | Description |
|---|---|
| System.Int32 | 100 if the sort order isn't Index, otherwise the the last page's sort index + 100 |
GetSortIndex(PageData, Int32, Boolean)
Gets the index of the sort. Internal use only.
Declaration
[Obsolete("Use instance method GetIndex(PageData sourcePage, int sortIndex, bool pageIsAddedToNewCollection) instead.", false)]
public static int GetSortIndex(PageData sourcePage, int sortIndex, bool pageIsAddedToNewCollection)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | sourcePage | The source page. |
| System.Int32 | sortIndex | Index of the sort. |
| System.Boolean | pageIsAddedToNewCollection | if set to |
Returns
| Type | Description |
|---|---|
| System.Int32 | New index of the source page |
SortAmongSiblings(PageData, Int32, AccessLevel)
Updated the sort order for so that the page is moved to a specified position.
Declaration
public virtual void SortAmongSiblings(PageData page, int newPosition, AccessLevel access)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort position. |
| System.Int32 | newPosition | The new position the page should be in when leaving this method, zero-based, excluding the current position of the page. |
| AccessLevel | access | The access level required to make changes to the pages. |
SortPageAmongSiblings(PageData, Int32)
Updated the sort order for so that the page is moved to a specified position.
Declaration
[Obsolete("Use instance method SortAmongSiblings(PageData page, int newPosition, AccessLevel access) instead.", false)]
public static void SortPageAmongSiblings(PageData page, int newPosition)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort position. |
| System.Int32 | newPosition | The new position. |
Remarks
Since this function will re-publish the pages, the currently logged in user will need publish access to any changed pages.
SortPageAmongSiblings(PageData, Int32, AccessLevel)
Updated the sort order for so that the page is moved to a specified position.
Declaration
[Obsolete("Use instance method SortAmongSiblings(PageData page, int newPosition, AccessLevel access) instead.", false)]
public static void SortPageAmongSiblings(PageData page, int newPosition, AccessLevel access)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort position. |
| System.Int32 | newPosition | The new position. |
| AccessLevel | access | The access level needed to save the pages. |
SortPageAmongSiblings(PageData, Int32, AccessLevel, IContentRepository)
Updated the sort order for so that the page is moved to a specified position.
Declaration
[Obsolete("Use instance method SortAmongSiblings(PageData page, int newPosition, AccessLevel access) instead.", false)]
public static void SortPageAmongSiblings(PageData page, int newPosition, AccessLevel access, IContentRepository contentRepository)
Parameters
| Type | Name | Description |
|---|---|---|
| PageData | page | The page to change sort position. |
| System.Int32 | newPosition | The new position. |
| AccessLevel | access | The access level needed to save the pages. |
| IContentRepository | contentRepository | The IContentRepository to use |