Showing posts with label Razor. Show all posts
Razor Code and Configuration for Umbraco Examine Search
Examine allows you to index and search data easily and wraps the Lucene.Net indexing/searching engine. Lucene is super
fast and allows for very fast searching even on very large amounts of
data. Examine is provider based so is very extensible and.
Send Email in Umbraco
Instead using the ASP.Net email sending code, we can use the following code to send email in Umbraco web applications.
Web.Config Configuration:
Gmail SMTP Settings:
<system.net> <mailSettings>
.
Razor function to fetch the Data Type Items in Umbraco
The following Razor function is used to fetch the Data Type Items in Umbraco.
Namespaces Required:
using System.Xml.XPath;using umbraco.MacroEngines;
@functions{
public List<string> FetchDataTypeItems(int DataTypeNodeID)
.
How to find the Document Type Alias of the First Child Node using Razor?
To find the Document Type Alias of the First Child Node using Razor.
@Model.Children.First().NodeTypeAlias.