Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/nightowl888/mvcsitemapprovider_363
- Owner: NightOwl888
- Created: 2014-10-10T15:33:45.000Z (about 10 years ago)
- Default Branch: master
- Last Pushed: 2014-10-11T09:55:28.000Z (about 10 years ago)
- Last Synced: 2024-05-01T21:20:39.583Z (7 months ago)
- Language: C#
- Size: 570 KB
- Stars: 0
- Watchers: 4
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
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.configModified the /Views/Shared/_Layout.cshtml to display the HTML helpers.