This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Contensis.Framework.Web; | |
@using CMS_API.Navigation; | |
@functions { | |
class NodeLookup { | |
public ContentNode GetWebPage(int webPageId) { | |
var navigationProvider = NavigationProviderFactory.GetNavigationProvider(NavigationProviderType.Xml); | |
var navigationItem = navigationProvider.GetNavigationWebpage(webPageId); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Contensis.Framework.Web | |
@using Contensis.Framework.Web.Search | |
@using System.Collections.ObjectModel | |
@{ | |
IQuery pageQuery = Query.WhereFullTextContains("Contensis", In.Column("Property_Title", 100), In.Column("SC_Content", 10)); | |
ReadOnlyCollection<ContentNode> pages = new NodeFinder().Find(pageQuery, selectCount:3); | |
} | |
<ul> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<control name="News Listing Using Node Query" showInMenu="true" category="Dev Training" viewingGroup="1"> | |
<properties> | |
<nodeQuery name="NewsArticlesQuery" orderby="Property_DatePublished desc"> | |
<where property="Type" operator="IsEqualTo" value="News" /> | |
<and property="Title" operator="Contains" value="@Request.Querystring.Keywords" /> | |
<and property="Data.TaxonomyCategories" operator="Contains" value="@Request.Querystring.category" /> | |
</nodeQuery> | |
</properties> | |
</control> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<control name="News Listing Using Node Query" showInMenu="true" category="Dev Training" viewingGroup="1"> | |
<properties> | |
<nodeQuery name="NewsArticlesQuery" orderby="Property_DatePublished desc"> | |
<where property="Type" operator="IsEqualTo" value="News" /> | |
</nodeQuery> | |
</properties> | |
</control> | |
@using Contensis.Framework.Web; | |
@using System.Collections.ObjectModel; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.Net.Mail | |
@{ | |
string email = "[email protected]"; | |
if(IsValidEmail(email)) | |
{ | |
// do something like submit the form and store the data, send an email or w/e | |
} | |
else |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Contensis.Framework.Web | |
@using Contensis.Framework.Web.Search | |
@using System.Collections | |
@using System.Collections.ObjectModel | |
@using System.Text.RegularExpressions; | |
@{ | |
if (CurrentNode.Data.Property_SynchronisationSourceMasterContentID >= 0) | |
{ | |
int masterPageContentID = CurrentNode.Data.Property_SynchronisationSourceMasterContentID; | |
Node masterPage = null; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using System.Collections.ObjectModel | |
@using Contensis.Framework.Web | |
@{ | |
// links in containing folder | |
ReadOnlyCollection<ContentNode> nodes = CurrentNode.Siblings(false); | |
// render - links if they exist | |
if(nodes.Count > 0) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@using Contensis.Framework.Web | |
@{ | |
NodeFactory nf = new NodeFactory(); | |
ContentNode n = (ContentNode)nf.LoadById(####); | |
<img src="@n.Path" alt="@n.MenuName" /> | |
} |