File: D:/HostingSpaces/TDijk1/erp-apps.eu/wwwroot/App_Code/Pux/Kentico/Macros/SiteMacroMethods.cs
using CMS;
using CMS.Helpers;
using CMS.MacroEngine;
using CMS.SiteProvider;
using Pux.Utils;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
// Makes all methods in the 'CustomMacroMethods' container class available for string objects
[assembly: RegisterExtension(typeof(SiteMacroMethods), typeof(string))]
public class SiteMacroMethods : MacroMethodContainer
{
[MacroMethod(typeof(string), "Translates given resource string using EBIZ resource strings.", 1)]
[MacroMethodParam(0, "resourceStringKey", typeof(string), "Name of the resource string.")]
public static object GetSiteResourceString(EvaluationContext context, params object[] parameters)
{
if (parameters.Length < 1)
{
throw new NotSupportedException();
}
var stringKey = parameters[0] as string;
return TextTools.GetSiteResourceString(stringKey);
}
}