Class PartialViewSnippetCollection
The collection of partial view snippets.
Namespace: Umbraco.Cms.Core.Snippets
Assembly: Umbraco.Core.dll
Syntax
public class PartialViewSnippetCollection : BuilderCollectionBase<ISnippet>, IBuilderCollection<ISnippet>
Constructors
View SourcePartialViewSnippetCollection(Func<IEnumerable<ISnippet>>)
Declaration
public PartialViewSnippetCollection(Func<IEnumerable<ISnippet>> items)
Parameters
Type | Name | Description |
---|---|---|
Func<IEnumerable<ISnippet>> | items |
Methods
View SourceGetContentFromName(String)
Gets the content of a partial view snippet as a string.
Declaration
public string GetContentFromName(string snippetName)
Parameters
Type | Name | Description |
---|---|---|
System.String | snippetName | The name of the snippet. |
Returns
Type | Description |
---|---|
System.String | The content of the partial view. |
GetNames()
Gets the partial view snippet names.
Declaration
public IEnumerable<string> GetNames()
Returns
Type | Description |
---|---|
IEnumerable<System.String> | The names of all partial view snippets. |