Minor edits to the comments
Mainly "Id's" => "Ids" and "html" => "HTML" 👀
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@*
|
||||
This snippet makes a breadcrumb of parents using an unordered html list.
|
||||
This snippet makes a breadcrumb of parents using an unordered HTML list.
|
||||
|
||||
How it works:
|
||||
- It uses the Ancestors() method to get all parents and then generates links so the visitor can go back
|
||||
|
||||
@@ -1,16 +1,16 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@*
|
||||
Macro to display a gallery of images from media the media section.
|
||||
Macro to display a gallery of images from the Media section.
|
||||
Works with either a 'Single Media Picker' or a 'Multiple Media Picker' macro parameter (see below).
|
||||
|
||||
How it works:
|
||||
- Confirm the macro parameter has been passed in with a value
|
||||
- Loop through all the media Id's passed in (might be a single item, might be many)
|
||||
- Loop through all the media Ids passed in (might be a single item, might be many)
|
||||
- Display any individual images, as well as any folders of images
|
||||
|
||||
Macro Parameters To Create, for this macro to work:
|
||||
Alias:mediaIds Name:Select folders and/or images Type: Multiple Media Picker
|
||||
Type: (note: you can use a Single Media Picker if that's more appropriate to your needs)
|
||||
Type: (note: You can use a Single Media Picker if that's more appropriate to your needs)
|
||||
*@
|
||||
|
||||
@{ var mediaIds = Model.MacroParameters["mediaIds"] as string; }
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
@*
|
||||
This snippet makes a list of links to the of parents of the current page using an unordered html list.
|
||||
This snippet makes a list of links to the of parents of the current page using an unordered HTML list.
|
||||
|
||||
How it works:
|
||||
- It uses the Ancestors() method to get all parents and then generates links so the visitor can go back
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@*
|
||||
This snippet makes a list of links to the of children of the current page using an unordered html list.
|
||||
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
|
||||
|
||||
How it works:
|
||||
- It uses the Children method to get all child pages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@*
|
||||
This snippet makes a list of links to the of children of the current page using an unordered html list.
|
||||
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
|
||||
|
||||
How it works:
|
||||
- It uses the Children method to get all child pages
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@inherits Umbraco.Web.Mvc.UmbracoTemplatePage
|
||||
|
||||
@*
|
||||
This snippet makes a list of links to the of children of the current page using an unordered html list.
|
||||
This snippet makes a list of links to the of children of the current page using an unordered HTML list.
|
||||
|
||||
How it works:
|
||||
- It uses the Children method to get all child pages
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
|
||||
@*
|
||||
This snippet creates links for every single page (no matter how deep) below
|
||||
the page currently being viewed by the website visitor, displayed as nested unordered html lists.
|
||||
the page currently being viewed by the website visitor, displayed as nested unordered HTML lists.
|
||||
*@
|
||||
|
||||
@{ var selection = Model.Content.Children.Where(x => x.IsVisible()); }
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
@* Add in level for a CSS hook *@
|
||||
<ul class="level-@naviLevel">
|
||||
@* For each child page where the property umbracoNaviHide is not True *@
|
||||
@* Loop through the selection *@
|
||||
@foreach (var item in selection)
|
||||
{
|
||||
<li>
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
|
||||
How it works:
|
||||
- Confirm the macro parameter has been passed in with a value
|
||||
- Loop through all the media Id's passed in (might be a single item, might be many)
|
||||
- Loop through all the media Ids passed in (might be a single item, might be many)
|
||||
- Display any individual images, as well as any folders of images
|
||||
|
||||
Macro Parameters To Create, for this macro to work:
|
||||
@@ -15,7 +15,7 @@
|
||||
@{ var mediaId = Model.MacroParameters["mediaId"]; }
|
||||
@if (mediaId != null)
|
||||
{
|
||||
@* Get all the media item associated with the id passed in *@
|
||||
@* Get the media item associated with the id passed in *@
|
||||
var media = Umbraco.TypedMedia(mediaId);
|
||||
var selection = media.Children<Image>();
|
||||
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@*
|
||||
This snippet lists the items from a Multinode tree picker, using the pickers default settings.
|
||||
Content Values stored as xml.
|
||||
This snippet lists the items from a Multinode tree picker, using the picker's default settings.
|
||||
Content Values stored as XML.
|
||||
|
||||
To get it working with any site's data structure, set the selection equal to the property which has the
|
||||
multinode treepicker (so: replace "PropertyWithPicker" with the alias of your property).
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
@*
|
||||
This snippet displays a list of links of the pages immediately under the top-most page in the content tree.
|
||||
This is the home page for a standard website.
|
||||
It also highlights the current active page/section in the navigation with the css class "current".
|
||||
It also highlights the current active page/section in the navigation with the CSS class "current".
|
||||
*@
|
||||
|
||||
@{ var selection = Model.Content.Site().Children.Where(x => x.IsVisible()); }
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
@inherits Umbraco.Web.Macros.PartialViewMacroPage
|
||||
|
||||
@*
|
||||
This snippet makes a list of links of all visible pages of the site, as nested unordered html lists.
|
||||
This snippet makes a list of links of all visible pages of the site, as nested unordered HTML lists.
|
||||
|
||||
How it works:
|
||||
- It uses a custom Razor helper called Traverse() to select and display the markup and links.
|
||||
|
||||
Reference in New Issue
Block a user