Definition at line 33 of file IPages.cs.
IPage erminas.SmartAPI.CMS.Project.Pages.IPages.Create |
( |
IContentClass |
cc, |
|
|
string |
headline = null |
|
) |
| |
Create a new page.
- Parameters
-
cc | Content class of the page |
headline | The headline, or null (default) for the default headline |
- Returns
- The newly created page
IPage erminas.SmartAPI.CMS.Project.Pages.IPages.CreateAndConnect |
( |
IContentClass |
cc, |
|
|
Guid |
linkGuid, |
|
|
string |
headline = null |
|
) |
| |
Create a new page in the current language variant and link it.
- Parameters
-
cc | Content class of the page |
linkGuid | Guid of the link the page should be linked to |
headline | The headline, or null (default) for the default headline |
- Returns
- The newly created (and linked) page
IPageSearch erminas.SmartAPI.CMS.Project.Pages.IPages.CreateSearch |
( |
| ) |
|
IPage erminas.SmartAPI.CMS.Project.Pages.IPages.GetByGuid |
( |
Guid |
pageGuid, |
|
|
ILanguageVariant |
languageVariant |
|
) |
| |
Get a page by its guid and its language variant. Does not load all Pages.
If it does not exists, an exception gets thrown.
IEnumerable<IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.Search |
( |
Action< IPageSearch > |
configurator = null | ) |
|
Convenience function for simple page searches. Creates a PageSearch object, configures it through the configurator parameter and returns the search result.
- Parameters
-
configurator | Action to configure the search |
- Returns
- The search results
The following code searches for all pages with headline "test": var results = project.SearchForPages(search => search.Headline="test");
Convenience funtion for extended page searches. Creates a new PageSearchExtended object which gets configured through the configurator parameter and returns the result of the search.
- Parameters
-
configurator | An action to configure the search |
- Returns
- The search results
The following code searches for all pages saved as draft by the current user:
var results = project.SearchForPagesExtended(
search => search.AddPredicate(
new PageStatusPredicate(PageStatusPredicate.PageStatusType.SavedAsDraft,
PageStatusPredicate.UserType.CurrentUser)
)
);
bool erminas.SmartAPI.CMS.Project.Pages.IPages.TryGetByGuid |
( |
Guid |
pageGuid, |
|
|
ILanguageVariant |
languageVariant, |
|
|
out IPage |
page |
|
) |
| |
Try to get a page by its guid and its language variant.
- Returns
- true, if the page exists, false otherwise
IndexedRDList<int, IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.OfCurrentLanguage |
|
get |
All pages of the current language variant, indexed by page id. The list is cached by default.
All Pages get loaded on first access, so this may be very slow for larger projects and you might want to use GetByGuid or TryGetByGuid instead, to only load single pages.
Definition at line 48 of file IPages.cs.
IndexedRDList<int, IPage> erminas.SmartAPI.CMS.Project.Pages.IPages.this[string language] |
|
get |
All pages of the a specific language variant, indexed by page id. The list is cached by default.
All Pages get loaded on first access, so this may be very slow for larger projects and you might want to use GetByGuid or TryGetByGuid instead, to only load single pages.
Definition at line 40 of file IPages.cs.
The documentation for this interface was generated from the following file: