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
var products = catalog.GetRootCategories() | |
.SelectMany(x => x.CategoryProductRelations | |
.Where(y => y.Category.DisplayOnSite) | |
.Select(y => y.Product)); |
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.Configuration | |
@using Twitterizer | |
@inherits Umbraco.Web.Mvc.UmbracoViewPage<Umbraco.Web.Models.PartialViewMacroModel> | |
@{ | |
var tokens = new OAuthTokens | |
{ | |
ConsumerKey = ConfigurationManager.AppSettings["twitterConsumerKey"], | |
ConsumerSecret = ConfigurationManager.AppSettings["twitterConsumerSecret"], | |
AccessToken = ConfigurationManager.AppSettings["twitterAccessToken"], | |
AccessTokenSecret = ConfigurationManager.AppSettings["twitterAccessTokenSecret"] |
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
namespace Our.Umbraco.AutoTweet.Web | |
{ | |
public class AppBase : ApplicationBase | |
{ | |
public AppBase() | |
{ | |
RegisterAssemblyReslover(); | |
} | |
private void RegisterAssemblyReslover() |
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
var testimonials = Model.Content.AncestorOrSelf(1) | |
.Sibling("Repository") | |
.Descendants("Testimonial"); |
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
<Target Name="UpdateAssemblyInfo"> | |
<FileUpdate | |
Encoding="ASCII" | |
Files="$(ProjectDir)\Properties\AssemblyInfo.cs" | |
Regex="AssemblyVersion\(".*"\)\]" | |
ReplacementText="AssemblyVersion("$(PackageVersion).0.0")]" /> | |
<FileUpdate | |
Encoding="ASCII" | |
Files="$(ProjectDir)\Properties\AssemblyInfo.cs" | |
Regex="AssemblyFileVersion\(".*"\)\]" |
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
public static class UmbracoHelperExtensions | |
{ | |
// These extensions methods are here to bypass an issue with Umbraco.TypedContent method | |
// wherby if an item is in the trashcan, a YSOD is thrown. The issue has been reported here | |
// http://issues.umbraco.org/issue/U4-1300 | |
// Once fixed, any uses of TypeContent2 can just be replaced with TypedContent calls | |
public static IEnumerable<IPublishedContent> TypedContent2(this UmbracoHelper helper, IEnumerable<string> ids) | |
{ | |
return helper.TypedContent2(ids.ToArray()); | |
} |
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
SELECT MAX(id) FROM [umbracoNode] |
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
@{ | |
var myModel = new MyModelObj(); | |
myModel.SomeProp = "Hello"; | |
} | |
@Html.CachedPartial("MyPartialName", myModel, 3600) | |
@{ | |
myModel.SomeProp = "World"; | |
} | |
@Html.CachedPartial("MyPartialName", myModel, 3600) |
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; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Web; | |
using System.Xml.Linq; | |
using Umbraco.Core; | |
using Umbraco.Core.Dynamics; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.PropertyEditors; | |
using Umbraco.Web; |
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
<?xml version="1.0" encoding="utf-8"?> | |
<configuration> | |
<startup useLegacyV2RuntimeActivationPolicy="true"> | |
<requiredRuntime safemode="true" imageVersion="v4.0.30319" version="v4.0.30319"/> | |
</startup> | |
</configuration> |