Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/nightowl888/mvcsitemapprovider_363

This is a demo showing how to add custom templated HTML helpers to MvcSiteMapProvider in order to extend its functionality. In this demo, we add Next() and Previous() helpers to walk up and down the SiteMap as if it were a table of contents.
https://github.com/nightowl888/mvcsitemapprovider_363

Last synced: 5 days ago
JSON representation

This is a demo showing how to add custom templated HTML helpers to MvcSiteMapProvider in order to extend its functionality. In this demo, we add Next() and Previous() helpers to walk up and down the SiteMap as if it were a table of contents.

Awesome Lists containing this project

README

        

This is a demo showing how you can create your own HTML helper to extend the
functionality of MvcSiteMapProvider. This demo creates Previous and Next
HTML helpers that iterate over the SiteMap as if it were a table of contents.

This project was created using the default MVC 4 template with MvcSiteMapProvider installled + the following modifications.

Files Added:

1. /HtmlHelpers/DocumentNavigationModel.cs
2. /HtmlHelpers/NextHelper.cs
3. /HtmlHelpers/PreviousHelper.cs
4. /Views/Shared/DisplayTemplates/DocumentNavigationModel.cshtml
5. Several views to make the navigation function under /Views/Home/ (not required to be copied into a real project)

Web.config changes:

1. Added ``
2. Added `` to /Views/Web.config

Modified the /Views/Shared/_Layout.cshtml to display the HTML helpers.