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 / Write.Default.cshtml
Last active Oct 30, 2019
EmailTextField Write.Default.cshtml - Autofill user
View Write.Default.cshtml
@model Telerik.Sitefinity.Frontend.Forms.Mvc.Models.Fields.EmailTextField.EmailTextFieldViewModel
@using Telerik.Sitefinity.UI.MVC;
@using Telerik.Sitefinity.Frontend.Forms.Mvc.Helpers;
@using Telerik.Sitefinity.Frontend.Mvc.Helpers;
@using Telerik.Sitefinity.Modules.Pages;
@using global::Medportal.Sitefinity.Controls;
@using Telerik.Sitefinity.Services;
@using Telerik.Sitefinity.Localization;
@using Telerik.Sitefinity.Frontend.Forms.Mvc.StringResources
@sitefinitysteve
sitefinitysteve / SitefinityServiceStackTemplate.cs
Last active Jul 24, 2019
This is everything you need to register a servicestack service in Sitefinity. Just set your Route, and make sure to register the plugin!
View SitefinityServiceStackTemplate.cs
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 / 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 Aug 14, 2019
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*@
You can’t perform that action at this time.