This file contains 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
''' Register any content to the head, whatever you pass in will be rendered out. | |
''' You could for example add a piece of script, a meta data reference or a stylesheet. | |
''' If the same key is used twice only the first key/script combination will be registered. | |
''' This ensures that you can call the routine multiple times without registering script multiple times. | |
Utilities.RegisterHeaderText("YourKey", "<meta http-equiv=""refresh"" content=""600"">") |
This file contains 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
Add -webkit-appearance: none; to enable height values in Chrome and Firefox | |
for Opera you will need .styled-select select {background-color: rgba(0,0,0,0);…} | |
Should work in proper browsers and IE8 + | |
You'll probably need razor to use his in the majority of the Contensis modules. |
This file contains 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
<!doctype html> | |
<html> | |
<head> | |
<meta charset="UTF-8"> | |
<title>divs - tables - cells - Go</title> | |
<style> | |
h2 { | |
font-weight:100; | |
margin:0; | |
padding:0; |
This file contains 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
@functions | |
{ | |
public Node GetNodeByContentId(int contentId) | |
{ | |
var myQuery = Query.Where("Property_C_ID").IsEqualTo(contentId.ToString()); | |
var nodes = new NodeFinder().Find(myQuery); | |
if (nodes.Count > 0) { | |
return nodes[0]; | |
} else { |
This file contains 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
@foreach (var newsArticle in newsList.Skip(3)) | |
{ | |
<a href="@newsArticle.Path">@newsArticle.Title</a> | |
} |
This file contains 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
@foreach (var newsArticle in newsList.Take(3)) | |
{ | |
<a href="@newsArticle.Path">@newsArticle.Title</a> | |
} |
This file contains 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
@foreach (var newsArticle in newsList.First()) | |
{ | |
<a href="@newsArticle.Path">@newsArticle.Title</a> | |
} |
This file contains 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
@foreach (var newsArticle in newsList.Last()) | |
{ | |
<a href="@newsArticle.Path">@newsArticle.Title</a> | |
} |
This file contains 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
try | |
{ | |
@foreach (var newsArticle in newsList.Single()) | |
{ | |
<a href="@newsArticle.Path">@newsArticle.Title</a> | |
} | |
} | |
Catch { | |
} |
OlderNewer