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
View | |
<div class="span9"> | |
@Html.ValidationSummary(true) | |
@Html.TextAreaFor(model => model.Post, | |
new{@class = "span9 input-xlarge", | |
placeholder = "What are you doing?"}) | |
@Html.TextBoxFor(model => model.Mentions, | |
new{@class = "span9 tokeninput", | |
placeholder = "Who should be notified?"}) |
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.Linq; | |
using System.Web.Http; | |
using System.Web.Routing; | |
using Umbraco.Core.Events; | |
using Umbraco.Core.Models; | |
using Umbraco.Core.Publishing; | |
using umbraco.interfaces; | |
namespace Site.EventHandlers | |
{ |
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
@inherits umbraco.MacroEngines.DynamicNodeContext | |
<div id="xsltsearch"> | |
<div id="xsltsearch_results"> | |
@{ | |
var term = Request["search"]; | |
if (term != null) | |
{ | |
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 umbraco.interfaces; | |
namespace MyNameSpace | |
{ | |
public class StartupEventHandlers : IApplicationStartupHandler | |
{ | |
public StartupEventHandlers() | |
{ | |
umbraco.macro.Error += macro_Error; |
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
<system.data> | |
<DbProviderFactories> | |
<remove invariant="System.Data.SqlServerCe.4.0"/> | |
<add name="Microsoft SQL Server Compact Data Provider 4.0" invariant="System.Data.SqlServerCe.4.0" description=".NET Framework Data Provider for Microsoft SQL Server Compact" type="System.Data.SqlServerCe.SqlCeProviderFactory, System.Data.SqlServerCe, Version=4.0.0.0, Culture=neutral, PublicKeyToken=89845dcd8080cc91" /> | |
<remove invariant="MySql.Data.MySqlClient"/> | |
<add name="MySQL Data Provider" invariant="MySql.Data.MySqlClient" description=".Net Framework Data Provider for MySQL" type="MySql.Data.MySqlClient.MySqlClientFactory, MySql.Data, Version=6.6.4.0, Culture=neutral, PublicKeyToken=c5687fc88969c44d" /> | |
</DbProviderFactories> | |
</system.data> |
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
<script src="@Url.Content("~/Scripts/jquery-1.6.4.min.js")" type="text/javascript"></script> | |
<script src="@Url.Content("~/Scripts/jquery/jquery.validate.min.js")" type="text/javascript"></script> | |
<script src="@Url.Content("~/Scripts/jquery/jquery.validate.unobtrusive.min.js")" type="text/javascript"></script> | |
<script src="@Url.Content("~/Scripts/jquery/jquery.unobtrusive-ajax.min.js")" type="text/javascript"></script> | |
<li><a href="#" id="login-result"></a></li> | |
@using (Ajax.BeginForm("LoginMember", "LoginSurface", new AjaxOptions { UpdateTargetId = "login-result" })) | |
{ | |
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 mediaImage = ms.CreateMedia("MyName", parentId, "Image"); | |
mediaImage.SetValue("umbracoFile", file); // file is of type HttpPostedFile, HttpPostedFileBase (for example: Request.Files[i]) or HttpPostedFileWrapper | |
ms.Save(mediaImage); |
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 name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf" providerName="System.Data.SqlServerCe.4.0" /> | |
Should be (notice the FLUSH INTERVAL in the connectionString): | |
<add name="umbracoDbDSN" connectionString="Data Source=|DataDirectory|\Umbraco.sdf;FLUSH INTERVAL=1" providerName="System.Data.SqlServerCe.4.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
SidebarNavigation.cshtml | |
@{ | |
@*Get the root of the website *@ | |
var root = Model.AncestorOrSelf(2); | |
} | |
<ul class="list2"> | |
@foreach (var page in root.Children.Where("Visible")) | |
{ | |
<li class="@page.IsAncestorOrSelf(Model, "current", "") @page.IsLast("last", "")"> |
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
@inherits umbraco.MacroEngines.DynamicNodeContext | |
@* | |
Macro to display a gallery from a media folder. Add the below parameter to the macro | |
and use it to point the macro at a specific media folder to display it's content as | |
a simple list. | |
Macro Parameters To Create, for this macro to work: | |
Show:True Alias:mediaId Name:Media Folder ID Type:MediaCurrent | |
*@ |