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
<rules> | |
<rule name="SimpleCanonicalHostNameRule"> | |
<match url="(.*)" /> | |
<conditions> | |
<add input="{HTTP_HOST}" pattern="^www\.example\.com$" negate="true" /> | |
</conditions> | |
<action type="Redirect" url="http://www.example.com/{R:1}" redirectType="Permanent" /> | |
</rule> |
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
@{ | |
if (feature.HasValue("Image")) | |
{ | |
var featureImage = Umbraco.TypedMedia((int)feature.Image); | |
var myCropUrl = featureImage.GetCropUrl("PageBannerCrop") ?? featureImage.GetCropUrl(200, 100); | |
<a href="@feature.Url" class="image image-full"><img src="@myCropUrl" alt="" /></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
public static string GetOptionalMediaUrl(this INode node, string propertyAlias) | |
{ | |
int? mediaId = node.GetOptionalNullableValue<int>(propertyAlias); | |
if (mediaId.HasValue) | |
{ | |
XPathNodeIterator media = library.GetMedia(mediaId.Value, false); | |
//we look at both //Image and //node, because some media items may not have been saved since the schema changed. | |
var file = media.Current.SelectSingleNode("//Image/umbracoFile | //node/data[@alias='umbracoFile']"); | |
if (file != null) | |
return file.InnerXml; |
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
(function(){ | |
var i = 0; | |
var count = $('.Album.unavailable,.Album.preview').length; | |
console.log('Found ' + count + ' albums to remove'); | |
var timeout = 0; | |
$('.Album.unavailable,.Album.preview').each(function(){ | |
var instance_i = i++; | |
var album = $(this); | |
album.trigger('mouseover').mouseenter(); | |
album.find('a,div,span,image').trigger('mouseover').mouseenter(); |