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
var url = Model.Content.GetPropertyValue<UrlPicker.Umbraco.Models.UrlPicker>("someProperty"); | |
<a href="@url.Url" target="@(url.Meta.NewWindow ? "_blank" : "")"> | |
@Umbraco.Coalesce(url.Meta.Title, "Some default caption") | |
</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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using System.Threading.Tasks; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Services; | |
using Umbraco.Web; | |
namespace Client.Umbraco.Extensions.Events |
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
Update-ExecutionPolicy Unrestricted | |
Set-WindowsExplorerOptions -EnableShowHiddenFilesFoldersDrives -EnableShowProtectedOSFiles -EnableShowFileExtensions -EnableShowFullPathInTitleBar | |
Disable-UAC | |
Disable-InternetExplorerESC | |
cinst TelnetClient -source windowsFeatures | |
cinst IIS-WebServerRole -source windowsFeatures | |
cinst UrlRewrite | |
cinst msdeploy3 |
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
/* | |
From: http://our.umbraco.org/forum/developers/api-questions/6327-Search-and-replace-property-value#comment23622 | |
*/ | |
--BEGIN TRAN; | |
DECLARE @rootNodeId NVARCHAR(50); | |
SET @rootNodeId = '1050'; | |
DECLARE @search NVARCHAR(50); | |
SET @search = 'Person 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
using Examine; | |
using Examine.Providers; | |
using Umbraco.Core; | |
using Umbraco.Web; | |
using umbraco.BusinessLogic; | |
using umbraco.businesslogic; | |
using umbraco.cms.businesslogic.media; | |
namespace YourSite | |
{ |
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
void Search_GatheringNodeData(object sender, IndexingNodeDataEventArgs e) | |
{ | |
// Create the "munged" field | |
AddToContentsField(e); | |
// Add a dummy value so its easy to get all docs | |
e.Fields.Add("allDocs", "1"); | |
// Replace CSV strings with spaces - easier to search | |
if (e.Fields.ContainsKey("searchChannels")) |
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
<?xml version="1.0" encoding="UTF-8"?> | |
<!DOCTYPE xsl:stylesheet [ | |
<!ENTITY nbsp " "> | |
]> | |
<xsl:stylesheet | |
version="1.0" | |
xmlns:xsl="http://www.w3.org/1999/XSL/Transform" | |
xmlns:msxml="urn:schemas-microsoft-com:xslt" | |
xmlns:umbraco.library="urn:umbraco.library" xmlns:Exslt.ExsltCommon="urn:Exslt.ExsltCommon" xmlns:Exslt.ExsltDatesAndTimes="urn:Exslt.ExsltDatesAndTimes" xmlns:Exslt.ExsltMath="urn:Exslt.ExsltMath" xmlns:Exslt.ExsltRegularExpressions="urn:Exslt.ExsltRegularExpressions" xmlns:Exslt.ExsltStrings="urn:Exslt.ExsltStrings" xmlns:Exslt.ExsltSets="urn:Exslt.ExsltSets" | |
exclude-result-prefixes="msxml umbraco.library Exslt.ExsltCommon Exslt.ExsltDatesAndTimes Exslt.ExsltMath Exslt.ExsltRegularExpressions Exslt.ExsltStrings Exslt.ExsltSets "> |
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
// Record Storage | |
Umbraco.Forms.Data.Storage.RecordStorage rs = new Umbraco.Forms.Data.Storage.RecordStorage(); | |
Guid formGuidGuid = new Guid("<your form GUID here>"); | |
// Get the record | |
Umbraco.Forms.Core.Record record = rs.GetRecord(formGuidGuid); | |
// RecordService | |
Umbraco.Forms.Core.Services.RecordService s = new Umbraco.Forms.Core.Services.RecordService(record); |
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
/// <summary> | |
/// Gets the media item by it's file path | |
/// </summary> | |
/// <remarks> | |
/// Example usage: Use in conjunction with HtmlAgilityPack or WYSIWYG.xslt to parse your RTE for Media Images, grab associated | |
/// properties from the Media node, and render them in your output (think alt tags, captions, etc). | |
/// TODO: support non "/media" directory, cleanup & further testing | |
/// </remarks> | |
/// <param name="mediaPath">Path to the uploaded file in the media directory</param> | |
/// <returns>Media node which contains the specified file</returns> |
NewerOlder