Skip to content

Instantly share code, notes, and snippets.

🏠
Working from home

Steve McNiven-Scott sitefinitysteve

🏠
Working from home
Block or report user

Report or block sitefinitysteve

Hide content and notifications from this user.

Learn more about blocking users

Contact Support about this user’s behavior.

Learn more about reporting abuse

Report abuse
View GitHub Profile
@sitefinitysteve
sitefinitysteve / GetIdp.cs
Created Mar 29, 2019
Get the logged in users IDP\IdentityProvider
View GetIdp.cs
public static class Util
{
public static string GetIdentityProvider()
{
var identity = ClaimsManager.GetCurrentIdentity();
var idToken = identity.Claims.FirstOrDefault(c => c.Type == "id_token");
if (idToken != null)
{
var handler = new JwtSecurityTokenHandler();
var jwtToken = handler.ReadToken(idToken.Value) as JwtSecurityToken;
@sitefinitysteve
sitefinitysteve / Index.cshtml
Last active Nov 23, 2018
Sitefinity twitter MVC widget
View Index.cshtml
@model SitefinityWebApp.Mvc.Models.Twitter.TwitterModel
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@Html.Script("/Mvc/Views/Twitter/Resources/twitter.js", "bottom")
<div id="twitter-feed" class="sfTweetsList" data-serviceurl="@Model.ServiceUrl">
<div class="sfTweetItem">
<h6>Latest Tweet</h6>
<div class="sfTweetWrp">
View genesis_public_key
04081e3baff413e9cc17b5c95013d27ded89553ae98c6f033e8fb2e1a72c63960be604fda42b1d83d59f2aa270b7e5b3dfb4a432c01eb9b6e8f4978eec663d608b
View SitefinityAngularDeclarations.cshtml
@model SitefinityWebApp.Mvc.Models.MyModel
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@Html.Script(Url.WidgetContent("Mvc/Scripts/Angular/angular.min.js"), "angular")
@Html.Script(Url.WidgetContent("Mvc/Scripts/Angular/angular-sanitize.min.js"), "angular")
@Html.Script("/MVC/Views/MyWidget/Resources/SitefinityAngularBootstrap.js", "bottom")
<div class="my-widget">
<div ng-controller="sessionsController">
{{ message }}
View SitefinityAngularBootstrap.js
$(function () {
//Boostrap each scheduler
$(".my-widget").each(function (index) {
var appName = 'myApp' + index;
var myApp = angular.module(appName, ['ngSanitize', 'kendo.directives']);
myApp.controller("myController", myController);
angular.bootstrap($(this).get(0), [appName]);
});
});
@sitefinitysteve
sitefinitysteve / Startup.cs
Created Nov 21, 2017
Sitefinity OWIN LetsEncrypt
View Startup.cs
using LetsEncrypt.Owin;
using Owin;
using Telerik.Sitefinity.Owin;
namespace SitefinityWebApp
{
public class Startup
{
public void Configuration(IAppBuilder app)
{
@sitefinitysteve
sitefinitysteve / Index.cshtml
Last active Apr 13, 2018
Sitefinity Forms Popup window template
View Index.cshtml
@model Telerik.Sitefinity.Frontend.Forms.Mvc.Models.FormViewModel
@using System;
@using System.Linq;
@using System.Collections;
@using Telerik.Sitefinity;
@using Telerik.Sitefinity.UI.MVC;
@using Telerik.Sitefinity.Frontend.Forms.Mvc.Helpers;
@using Telerik.Sitefinity.Frontend.Forms.Mvc.Models;
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
View NavigationView.Dropdown.cshtml
//PLACE IN /ResourcePackages/<YourPackage>/MVC/Views/Navigation
@model Telerik.Sitefinity.Frontend.Navigation.Mvc.Models.INavigationModel
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@using Telerik.Sitefinity.Frontend.Navigation.Mvc.Models;
@using System.Text.RegularExpressions;
@using Telerik.Sitefinity.Modules.Pages;
@*Add scripts and stylesheets*@
@sitefinitysteve
sitefinitysteve / CodeRushServiceStack
Created Feb 2, 2017
Coderush for Roslyn: ServiceStack Sitefinity Template
View CodeRushServiceStack
using System;
using System.Collections.Generic;
using System.Linq;
using Telerik.Sitefinity;
using Telerik.Sitefinity.Model;
using Telerik.Sitefinity.DynamicModules;
using Telerik.Sitefinity.Data.Linq.Dynamic;
using Telerik.Sitefinity.Services.Search;
using Telerik.Sitefinity.Utilities.TypeConverters;
using ServiceStack.Text;
@sitefinitysteve
sitefinitysteve / error.md
Last active Jan 27, 2017
Kendo Grid data undefined error
View error.md
Uncaught TypeError: Cannot read property 'data' of undefined
    at init.setup (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at init.create (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at Object.<anonymous> (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at Function.Deferred (ScriptResource.axd?d=OfhH2xFGzDSYc0LaAaaOD08yz4IMU64J5fBMHu0-Lz13cohNhivVQFfhqawUAIMaGh_RVi-P3FmRXW…:2)
    at init._promise (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at init._send (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at init.sync (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl16_TSM&compress=2&_TSM_CombinedScripts_=%3b%3bT…:28)
    at init.saveRow (Telerik.Web.UI.WebResource.axd?_TSM_HiddenField_=ctl1
You can’t perform that action at this time.