Skip to content

Instantly share code, notes, and snippets.

do you sitecore?

Tony Mamedbekov tmamedbekov

do you sitecore?
Block or report user

Report or block tmamedbekov

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
View ProfileComponent.sitecore.js
import { CommonFieldTypes, SitecoreIcon, Manifest } from '@sitecore-jss/sitecore-jss-manifest';
export default function(manifest) {
name: 'Profile',
icon: SitecoreIcon.DocumentTag,
fields: [
{ name: 'avatar', type: CommonFieldTypes.Image },
{ name: 'name', type: CommonFieldTypes.SingleLineText },
{ name: 'title', type: CommonFieldTypes.SingleLineText },
View index.js
import React from 'react';
import { Text, Image } from '@sitecore-jss/sitecore-jss-react';
const Profile = (props) => (
<div className="col-md-8">
<h1><Text field={} /></h1>
View en.yml
View phantomjs_patch.config
<?xml version="1.0" encoding="utf-8"?>
<configuration xmlns:patch="" xmlns:role="">
<sitecore role:require="ContentDelivery or Reporting or Processing">
<setting name="ContentTesting.AutomaticContentTesting.Enabled" value="false" />
<setting name="ContentTesting.AlwaysShowTestCandidateNotification" value="false" />
<processor type="Sitecore.ContentTesting.Pipelines.RenderingRuleEvaluated.TestingRule, Sitecore.ContentTesting">
View index.html
<section class="row page-header sampleComponent spaced-row" ng-show="data">
<div class="col-xs-12">
<h1 class="header" ng-bind-html="data.Title | asTrusted"></h1>
<article class="col-xs-7 col-md-8">
<p ng-bind-html="data.Text | asTrusted"></p>
<figure class="col-xs-5 col-md-4">
<span ng-bind-html="data.Image | asTrusted"></span>
View myangular.js
angular.module('sc.sample', [
]).directive('sampleComponent', function () {
return {
scope: {
data: '=sampleComponent'
templateUrl: `[template path]/index.html`
}).controller('SampleDemoController', ['$scope', function ($scope) {
View AngularController.cs
using System.Web;
using System.Web.Mvc;
using Sitecore.Mvc.Extensions;
namespace sitecore.local.Controllers
public static class Angular
public static IHtmlString RawJsEncodedString<T>(this HtmlHelper<T> htmlHelper, HtmlString str)
View angularLayout.cshtml
@using Sitecore.Mvc
@using Sitecore.Mvc.Extensions
@using sitecore.local.Controllers
Layout = null;
<!DOCTYPE html>
tmamedbekov / ItemMoving.config
Created Jun 6, 2017
Item Moving configuration that will patch the Sitecore.config
View ItemMoving.config
<?xml version="1.0" encoding="utf-8"?>
<!--Custom Code that will do item moving-->
<agent type="sitecore.local.CustomCode.ItemMoving" method="Execute" interval="00:00:59"/>
tmamedbekov / itemMoving.cs
Created Jun 6, 2017
Custom Code for Moving Item from one directory to another
View itemMoving.cs
using Sitecore.Configuration;
using Sitecore.Data.Items;
using Sitecore.Data;
using Sitecore.Data.Fields;
namespace sitecore.local.CustomCode
public class ItemMoving
private readonly Database _sourceDatabase = Factory.GetDatabase("master");
You can’t perform that action at this time.