Is there a list of razor helpers for templates? Or generally any documentation on these helpers?
Initially I would like to add a 'date modified' in a MVC template for displaying when the page was last updated.
Anyone?
Hello?
Hey Geoff,
This article covers how to get the current page data via page node ID:
[View:https://www.progress.com/documentation/sitefinity-cms/for-developers-query-pagedata-by-pagenode-id:550:50]
You can get the current node by following this:
var currentPageNode = SiteMapBase.GetActualCurrentNode();
Geoff: I haven't found a documentation page like you are asking. You could look through some of the HtmlHelper extensions in the Feather github repo. There are a number of HtmlHelper extension methods in the classes in this folder:
https://github.com/Sitefinity/feather/tree/master/Telerik.Sitefinity.Frontend/Mvc/Helpers
For your idea of adding date modified, it doesn't look like any of those expose that data. The closest would be a call to @SitefinityContext.Page, which ideally would have it, but Sitefinity limits the return of the Page info to Title and Keywords. My guess is you would need to write you own extension that duplicates the code in that method, but exposes more data with your own model.