This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits RenderViewPage | |
@using Umbraco.Cms.Web; | |
<h2>Built in Properties</h2> | |
<h4>Common</h4> | |
<p> | |
<strong>@@DynamicModel.Name</strong><br/> | |
@DynamicModel.Name | |
</p> | |
<p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@* Ensure that the Current Page has children, where the property umbracoNaviHide is not True *@ | |
@if (DynamicModel.Children.Where("umbracoNaviHide != @0", "True").Any()) | |
{ | |
@* Get the first page in the children, where the property umbracoNaviHide is not True *@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@{ | |
@* Get the content type alias we want to filter on from the macro parameter *@ | |
var contentTypeAlias = Model.MacroParameters.contentTypeAlias; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@* Ensure that the rootNode has children, where the property umbracoNaviHide is not True *@ | |
@if(DynamicModel.Children.Where("umbracoNaviHide != @0", "True").Any()) | |
{ | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@{ | |
@* Walk up the tree from the current page to get the root node *@ | |
var rootNode = DynamicModel.AncestorsOrSelf.Last(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//Order by Node Name | |
@foreach (Content child in Model.ChildContent().OrderBy(x => x.Name)) | |
{ | |
<h2>@child.Name</h2> | |
} | |
//Order by custom property on node with alias of 'pageTitle' | |
@foreach (Content child in Model.ChildContent().OrderBy(x => x.Field("pageTitle"))) | |
{ | |
<h2>@child.Name</h2> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@* | |
================= Credit goes to Jorge Lusar for creating this ================= | |
Original's at: https://gist.github.com/jorgelusar | |
Parameters | |
FeedItems (int, optional, default 20, number of items to be displayed) | |
FeedTitle (string, optional, default domain name, the title of the feed) | |
FeedDescription (string, optional, default domain name, the description of the feed) | |
Author (string, optional, default 'admin', the author name or website name to ensure the atom feed is valid) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@{ | |
//Get the current page | |
var currentPage = DynamicModel; | |
//Will walk up the tree to the last ancestor node aka RootNode |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@* Check we have child pages *@ | |
@if (DynamicModel.Children.Any()) | |
{ | |
<nav id="subnavi"> | |
<ul> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@inherits PartialViewMacroPage | |
@using Umbraco.Cms.Web | |
@using Umbraco.Cms.Web.Macros | |
@using Umbraco.Framework | |
@{ | |
@* Get the macro parameter and check it has a value otherwise set to empty hive Id *@ | |
var startNodeID = String.IsNullOrEmpty(Model.MacroParameters.startNodeID) ? HiveId.Empty.ToString() : Model.MacroParameters.startNodeID; | |
} |
NewerOlder