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 System.Collections.Generic; | |
using System.Linq; | |
using MyProject.Models; | |
using Scriban.Runtime; | |
using Sitecore.Data; | |
using Sitecore.Data.Items; | |
using Sitecore.XA.Foundation.Scriban.Pipelines.GenerateScribanContext; | |
namespace MyProject.Pipelines.GenerateScribanContext | |
{ |
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 System; | |
using System.Collections.Generic; | |
using System.Data; | |
using System.Data.Common; | |
using System.Data.SqlClient; | |
using System.Globalization; | |
using System.IO; | |
using System.Linq; | |
using System.Net; | |
using System.Net.Mail; |
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
(function(speak) { | |
speak.pageCode(["/-/speak/v1/formsbuilder/assets/filedownloader.js"], | |
function(fileDownloader) { | |
var exportDataBaseUrl = "/sitecore/api/ssc/forms/exportcustomdata"; | |
return { | |
initialized: function() { | |
this.on({ | |
"exportdata:Submit": this.submit, | |
"exportdata:EmailSubmit": this.emailsubmit, |
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
<?xml version="1.0"?> | |
<configuration xmlns:patch="http://www.sitecore.net/xmlconfig/" xmlns:activeenv="http://www.sitecore.net/xmlconfig/activeenv/"> | |
<sitecore> | |
<settings> | |
<setting name="Sitecore.ExperienceForms.ExportDataDelimiter" value="," /> | |
</settings> | |
<services> | |
<register serviceType="Sitecore.ExperienceForms.Client.Controllers.ExportDataController, Sitecore.ExperienceForms.Client" | |
implementationType="Sitecore.ExperienceForms.Client.Controllers.ExportDataController, Sitecore.ExperienceForms.Client" > | |
<patch:attribute name="serviceType">MyProject.Controllers.ExportCustomDataController, MyProject</patch:attribute> |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="GetDeviceInfo.aspx.cs" Inherits="MyProject.Foundation.SitecoreSupport.sitecore.admin.GetDeviceInfo" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> |
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 System; | |
using System.Net; | |
using Microsoft.Extensions.DependencyInjection; | |
using Sitecore.DependencyInjection; | |
using Sitecore.Pipelines.HttpRequest; | |
using Sitecore.XA.Foundation.Abstractions; | |
using Sitecore.XA.Feature.ErrorHandling.Services; | |
namespace MyProject.Pipelines.HttpRequestProcessed | |
{ |
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
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="VersionedMediaCreateLanguageVersion.aspx.cs" Inherits="MyProject.sitecore.Admin.VersionedMediaCreateLanguageVersion" %> | |
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head runat="server"> | |
<title></title> | |
</head> | |
<body> | |
<form id="form1" runat="server"> |
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 SearchResults<CustomSearchResultItem> SearchItemsByKeyword(string keyword) | |
{ | |
IQueryable<CustomSearchResultItem> query = context.GetQueryable<CustomSearchResultItem>(); | |
IQueryable<CustomSearchResultItem> query1 = context.GetQueryable<CustomSearchResultItem>(); | |
IQueryable<CustomSearchResultItem> query2 = context.GetQueryable<CustomSearchResultItem>(); | |
var expression = PredicateBuilder.True<CustomSearchResultItem>(); | |
var expression1 = PredicateBuilder.True<CustomSearchResultItem>(); | |
var expression2 = PredicateBuilder.True<CustomSearchResultItem>(); | |
// Applying normal boosting to all the fields | |
var namePredicate = PredicateBuilder.False<CustomSearchResultItem>(); |
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
protected override bool Execute(string data, FormSubmitContext formSubmitContext) | |
{ | |
Assert.ArgumentNotNull((object)formSubmitContext, nameof(formSubmitContext)); | |
var formData = formSubmitContext.Fields; | |
//Get the data from other fields | |
//Hidden Field created for getting the status | |
var statusField = formData.Where(x => x.Name == "Status").FirstOrDefault(); | |
//Post the data from other fields to any services or third party providers to get the status | |
var result = "POST THE DATA TO THE THIRD PARTY PROVIDER AND GET THE RESULT"; | |
SetValue(statusField, result); |
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 GatedAssetBindingHandler : IBindingHandler | |
{ | |
public IBindingHandlerResult GetBindingValue() | |
{ | |
var mediaID = HttpContext.Current.Request.QueryString["mediaid"]; | |
if (!string.IsNullOrEmpty(mediaID)) | |
{ | |
var mediaItem = Sitecore.Context.Database.GetItem(mediaID); | |
if (mediaItem != null && mediaItem.Paths.IsMediaItem) | |
{ |
NewerOlder