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 Microsoft.AspNetCore.Mvc; | |
using Newtonsoft.Json; | |
using NPoco; | |
using Umbraco.Cms.Infrastructure.Persistence.DatabaseAnnotations; | |
using Umbraco.Cms.Infrastructure.Scoping; | |
using Umbraco.Cms.Web.Common.Controllers; | |
namespace UmbracoProject; | |
public class FeedbackController : UmbracoApiController |
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 Umbraco.Cms.Core.DeliveryApi; | |
using Umbraco.Cms.Core.Models.PublishedContent; | |
using Umbraco.Cms.Core.Routing; | |
namespace UmbracoProject; | |
public class CustomApiMediaUrlProvider : IApiMediaUrlProvider | |
{ | |
private readonly IPublishedUrlProvider _publishedUrlProvider; |
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
import React from 'react'; | |
import i18n from 'i18next'; | |
import Helmet from 'react-helmet'; | |
import TopLoader from 'react-top-loader'; | |
import { isEditorActive, withSitecoreContext } from '@sitecore-jss/sitecore-jss-react'; | |
import { layoutServiceFactory } from './lib/layout-service-factory'; | |
import config from './temp/config'; | |
import Layout from './Layout'; | |
import NotFound from './NotFound'; |
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
public class ProjectIdentityProvider : IdentityProvidersProcessor | |
{ | |
private readonly IConfigurationRepository configurationRepository; | |
private readonly IUrlUtils urlUtils; | |
private readonly ICookieManager cookieManager; | |
public ProjectIdentityProvider( | |
IConfigurationRepository configurationRepository, |
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
import React, { useEffect, useState } from 'react'; | |
import { withSitecoreContext, dataApi, Placeholder } from '@sitecore-jss/sitecore-jss-react'; | |
import { dataFetcher } from './dataFetcher'; | |
import config from './temp/config'; | |
const HybridPlaceholder = ({ | |
name, | |
rendering, | |
sitecoreContext, | |
}) => { |
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
// -------------------------------------------------------------------------------------------------------------------- | |
// <copyright file="ContentExtensions.cs" company="Colours B.V."> | |
// © Colours B.V. 2015 | |
// </copyright> | |
// <summary> | |
// The content extensions. | |
// </summary> | |
// -------------------------------------------------------------------------------------------------------------------- | |
namespace Project.Web.Core.Extensions |
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 items = this.GetPropertyValue<IEnumerable<IPublishedContent>>("sliderNestedContent"); | |
//Slider is a generated model based on a document type. | |
//Currently x as Slider returns null. | |
return items.Select(x => x as Slider); |
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
// Use Gists to store code you would like to remember later on | |
console.log(window); // log the "window" object to the console |
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
[ImplementPropertyType("slider")] | |
public IEnumerable<HomeSlider> Slider | |
{ | |
get | |
{ | |
var archetypeModel = this.GetPropertyValue<ArchetypeModel>("slider"); | |
return archetypeModel.Select(x => | |
{ | |
return new HomeSlider() | |
{ |
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
/// <summary> | |
/// Return the all the data required for filtering and displaying object types. | |
/// </summary> | |
/// <returns></returns> | |
public static IEnumerable<ObjectTypeItem> GetObjectTypeItems() | |
{ | |
//Get the node where all projects and object types are below. | |
var projectOverview = Umbraco.TypedContent(ConfigurationManager.AppSettings["projectOverviewId"]); | |
return |
NewerOlder