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 Corlate.Foundation.Common.Gutters | |
{ | |
using Sitecore.Configuration; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.Shell.Applications.ContentEditor.Gutters; | |
public class PublishedStatusGutter : GutterRenderer | |
{ |
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 ActionResult Index() | |
{ | |
if (Sitecore.Context.IsLoggedIn) | |
{ | |
///all the logic here | |
} | |
else | |
{ | |
return Redirect("~/sitecore/login"); | |
} |
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 Basiscore.Foundation.Backoffice | |
{ | |
using System.Web.Mvc; | |
using System.Web.Routing; | |
public class RouteConfig | |
{ | |
public static void RegisterRoutes(RouteCollection routes) | |
{ |
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.Web.Mvc; | |
namespace Basiscore.Foundation.Backoffice.Areas.Backoffice | |
{ | |
public class BackofficeAreaRegistration : AreaRegistration | |
{ | |
public override string AreaName | |
{ | |
get | |
{ |
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 Sitecore.SecurityModel; | |
using System; | |
using System.Collections.Generic; | |
using System.Reflection; | |
using System.Web.Mvc; | |
using System.Web.Security; | |
public class CreateFakeUsersController : Controller | |
{ | |
#region CONFIGURATIONS |
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
<script type="text/javascript"> | |
$(document).ready(function () { | |
$("#btnSubmit").click(function () { | |
CreateFakeUsers(); | |
}); | |
}); | |
function CreateFakeUsers() { | |
var fakeUsersModel = {}; | |
fakeUsersModel.SelectedDomain = $("#ddlDomains").val(); |
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.Collections.Generic; | |
public class FakeUsersModel | |
{ | |
public string SelectedDomain { get; set; } | |
public string NumberOfUsersToCreate { get; set; } | |
private string _EmailSuffix; | |
public string EmailSuffix |
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
/* | |
1. set master DB as the context database | |
2. Give the target template path (use only template specific subpath) | |
3. Parent folder path | |
4. ($_.TemplateName -eq "Image") - name of the existing template in quotes. | |
*/ | |
$master = [Sitecore.Configuration.Factory]::GetDatabase("master"); | |
$entryTemplate = $master.Templates['System/Media/Unversioned/Image']; | |
cd master:"\media library\Documents"; | |
Get-ChildItem -recurse | ForEach-Object { if ($_.TemplateName -eq "Image") { $_.ChangeTemplate($entryTemplate) } }; |
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 Sitecore; | |
using Sitecore.Configuration; | |
using Sitecore.Data; | |
using Sitecore.Data.Fields; | |
using Sitecore.Data.Items; | |
using Sitecore.Layouts; | |
using Sitecore.SecurityModel; | |
private bool RemoveRendering(Item targetItem) | |
{ |
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 Sitecore; | |
using Sitecore.Configuration; | |
using Sitecore.Data; | |
using Sitecore.Data.Fields; | |
using Sitecore.Data.Items; | |
using Sitecore.Layouts; | |
using Sitecore.SecurityModel; | |
private void AddRendering(Item targetItem) | |
{ |
NewerOlder