Quantcast
Channel: Optimizely Search & Navigation
Viewing all 6894 articles
Browse latest View live

Dot Net Training Services

$
0
0

The Dot Net Training will lead you to better career opportunities. If are aiming to become a Dot web applied scientist and are finding out Dot web Institutes, then is that the IT coaching institute that provides the most effective Dot web coaching.The Dot Net syllabus is designed by experts.

Dot net is understood as Business Policy, programming concept from Microsoft Web services

The .NET framework may be a code development framework from Microsoft.

C# is known as C sharp that is a simple and easy, latest object oriented language.

Visual Basic is Associate in Nursing should learn language, that is with simple and easy syntax for designing object oriented applications.

Dot net core open supply net framework, that that has a lot of performance than ASP.NET

https://www.exltech.in/dot-net-training.html


Failed to load viewstate - XForms - Episerver Version 6 R2

$
0
0

Hi,

When we sometimes (not all the time) save an XForm of a page in the CMS we get the following error:

Exception information:
Exception type: HttpException
Exception message: Failed to load viewstate. The control tree into which viewstate is being loaded must match the control tree that was used to save viewstate during the previous request. For example, when adding controls dynamically, the controls added during a post-back must match the type and position of the controls added during the initial request.
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)



Request information:
Request URL: https://www.XXXX.com:443/cm/ui/cms/edit/editpanel.aspx?id=143952&epslanguage=cy-GB
Request path: /cm/ui/cms/edit/editpanel.aspx
User host address: 162.158.158.124
User: helena.scott
Is authenticated: True
Authentication Type: Forms
Thread account name: NT AUTHORITY\NETWORK SERVICE

Thread information:
Thread ID: 15
Thread account name: NT AUTHORITY\NETWORK SERVICE
Is impersonating: False
Stack trace: at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Control.LoadChildViewStateByIndex(ArrayList childState)
at System.Web.UI.Control.LoadViewStateRecursive(Object savedState)
at System.Web.UI.Page.LoadAllState()
at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)

Do you know why this maybe?

Thanks

Approval upon re-ordering pages under the same parent

$
0
0

While teting approval workflows in EPi11 we have observed that when the order of pages within the same parent is changed approval is not required. We do strongly believe that this is something to be considered for future releases since changing the order of pages within the same parent may well influence the way navigation is presented within a web-site, which, in the end, can be considered a content change.

Removing Find but keeping packages

$
0
0

We need to stop using Find for business reasons and I am having a hard time figuring out how to remove it/disable it without ripping out the packages (didnt want to do that incase we do need to easily turn it back on).
I have commented out all refrences to it in the web.config and removed our own custom initialization module but its still trying to run framework initialization modules and errors out since it cannot find the service url.

Errors I am getting:

[ConfigurationErrorsException: The serviceUrl cannot be empty]
   EPiServer.Find.Client.CreateFromConfig(Boolean bypassLicenseRestriction) +497
   EPiServer.Find.Framework.SearchClient..cctor() +20
[TypeInitializationException: The type initializer for 'EPiServer.Find.Framework.SearchClient' threw an exception.]
   EPiServer.Find.Cms.Module.IndexingModule.InitializeClient() +453
   EPiServer.Find.Cms.Module.IndexingModule.Initialize(InitializationEngine context) +41
   EPiServer.Framework.Initialization.Internal.ModuleNode.Execute(Action a, String key) +58
   EPiServer.Framework.Initialization.Internal.ModuleNode.Initialize(InitializationEngine context) +123
   EPiServer.Framework.Initialization.InitializationEngine.InitializeModules() +248

This is on CMS 11 and Commerce 12.

What else do I need to do to get it completly disabled? Thanks.


                       

Cannot load page with SKU in Commerce

$
0
0

We`ve got a problem on one of our environments, when we open commerce tab and go to SKU edit page, the page cannot be loaded.

I checked outcoming requests and find one, that failed:

In EpiserverError.log:

2019-07-31 20:02:35,991 cms01-srv-prod [1111] ERROR EPiServer.Global: Unhandled exception in ASP.NET
System.ArgumentNullException: The provided content link does not have a value.
Parameter name: contentLink
at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Commerce.Shell.ObjectEditing.InternalMetadata.CommerceMediaModelConverter.ToClientModel(Object serverModel)
at EPiServer.Commerce.Shell.Serialization.Json.CommerceMediaConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Commerce.Serialization.Json.ItemCollectionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeDictionary(JsonWriter writer, IDictionary values, JsonDictionaryContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Framework.Serialization.Json.Internal.JsonObjectSerializer.Serialize(TextWriter textWriter, Object value)
at EPiServer.Shell.Services.Rest.RestResultBase.ExecuteResult(ControllerContext context)
at EPiServer.Shell.Services.Rest.RestResult.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)
System.ArgumentNullException: The provided content link does not have a value.
Parameter name: contentLink
at EPiServer.Core.Internal.DefaultContentLoader.Get[T](ContentReference contentLink, LoaderOptions loaderOptions)
at EPiServer.Commerce.Shell.ObjectEditing.InternalMetadata.CommerceMediaModelConverter.ToClientModel(Object serverModel)
at EPiServer.Commerce.Shell.Serialization.Json.CommerceMediaConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Commerce.Serialization.Json.ItemCollectionConverter.WriteJson(JsonWriter writer, Object value, JsonSerializer serializer)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeConvertable(JsonWriter writer, JsonConverter converter, Object value, JsonContract contract, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeDictionary(JsonWriter writer, IDictionary values, JsonDictionaryContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.SerializeObject(JsonWriter writer, Object value, JsonObjectContract contract, JsonProperty member, JsonContainerContract collectionContract, JsonProperty containerProperty)
at Newtonsoft.Json.Serialization.JsonSerializerInternalWriter.Serialize(JsonWriter jsonWriter, Object value, Type objectType)
at Newtonsoft.Json.JsonSerializer.SerializeInternal(JsonWriter jsonWriter, Object value, Type objectType)
at EPiServer.Framework.Serialization.Json.Internal.JsonObjectSerializer.Serialize(TextWriter textWriter, Object value)
at EPiServer.Shell.Services.Rest.RestResultBase.ExecuteResult(ControllerContext context)
at EPiServer.Shell.Services.Rest.RestResult.ExecuteResult(ControllerContext context)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilterRecursive(IList`1 filters, Int32 filterIndex, ResultExecutingContext preContext, ControllerContext controllerContext, ActionResult actionResult)
at System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.<>c__DisplayClass3_1.<BeginInvokeAction>b__5(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker.EndInvokeAction(IAsyncResult asyncResult)
at EPiServer.Shell.Services.Rest.RestControllerBase.EndExecute(IAsyncResult asyncResult)
at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()
at System.Web.HttpApplication.ExecuteStepImpl(IExecutionStep step)
at System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean& completedSynchronously)

We tried to investigate this issue, but with no result.

Could you please explain what can be the potential issue or where we should see to find the origin of the problem.

What is the recommended way to store API credentials in EPiServer?

$
0
0

I have an external API that I need to connect to from EPiServer, which requires a username and password. I want to make the credentials editable by administrators, so hard-coding or putting in a web.config is not an option. I was considering storing them as properties on the start page with a masked textbox like this post discusses:
https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2016/5/password-field-in-start-page-settings/ 

Although that one gives me pause because the actual password can be read by viewing the source of the page. I am looking for any other potential solutions that would allow me to store them somewhere securely, maybe in azure key vault. Has anyone else done this before?

Error message is not vanishing even the required field is filled.

$
0
0

Hi,

This is happenning after upgrading Episerver to 11.6. While creating a page required field error message is still there even the field has valid value.

Thanks!

.Net Core Support (Official Response Requested)

$
0
0

Hi,

I know I have asked this before but I'm going to ask again as there has been no official response yet.

We are looking at moving all our applications to the cloud and as part of this would like to move all our .Net applications to .Net Core.

Microsoft has officially announced that .Net Core is the future so everyone will need to move there applications eventually.  To help us with planning our migration to a cloud based architecture we need to know when EPiServer will support .Net Core as this will impact what we can use to host EPiServer.

Microsoft has given us their roadmap for the future of .Net and also indicated that .Net Framework 4.8 will be the last release of the old framework.  As .Net Core brings significant performance and memory usage improvements it is very desirable when doing a cloud migration.

I know the roadmap webinar posted recently mentioned .Net Core but gave no specific details.  Can we get an official response on either what the roadmap is or when we will know when the roadmap is available.

We are also starting to plan the refresh of our web site and a .Net Core roadmap (or lack of one) will factor into this.

Thanks,

Phil


How to set multiple domain and backend access

$
0
0

Hi Team,

I have questions regarding multi-domain.

We need to set up multiple domains (not epi multisite).

a)how to set up multiple domains for the epi site?

example:

1.domain 1 -(site,backend)

2.domain 2 -(site only)

b)Need to restrict the domain2 site epi backend access. How to restrict that access?

c)Is there any license update need for this multi-domain?

Advance thanks,

Deleted property of a variant still showing in edit mode

$
0
0

Deleted property of a variant still showing in edit mode. I have unchecked it in metaclass of commerce manager as well.

Problem with Client Certificates in DXC for authentication against an external API

$
0
0

Hello

TL;DR; I'm looking for assistence using multiple certificates for authentication of webrequests against an external API form the DXC encironemnts. 

I'm working with an external API that requiers multiple certificats for authentication when making requests. (Swish Paymetns)

My code works well in local environemnt, and it works under certain conditions in DXC Integration and PreProduction.

This is an example from the integration guide for the API to test for successfull connection. Users are provided one personal cert as well as the root cert .pem file.

curl -s -S -i --cert <path-to-certificate-file>:<password> --cert-type
p12 --cacert <path-to-rootCA-pem-file> --tlsv1.1 --header "Content-Type:
application/json"<endpoint-url> --data '<json-formatted-data>'

In my application, my first approach was to install the certificats on my local machine, as well as in the Azure Web App Certificate Store. I then used thumbprints to find and load the certificates. This worked well, and I deployed the code to the DXC and verified my integration. But at my next deploy of code, the public certificates had been removed from the Azure Certificate Store! Through Epi Support, I learned that this is intentional from Microsoft when new slots are copied, as is being done in DXC-deployment scripts. So, the certificats would have to be uploaded again after each deploy which is not a long term solution...

Microsoft suggested placing the public parts of the certificates in the file system, and reading them from there. 

I adjusted my code, and for good measure placed both .pfx and .pem fil in the wwwroot, and read the certificates directly from file, ignoring the Azure Certificate Store.

In my local setup, this works well, and when uploading to DXC, it works, BUT only when the public certificates are still in the Azure Certificate Store.... (WHAT!?)

So, even when both certificates are read from file, if they are missing from the Certificate Store, the requests still fails.

I'm looking for input in using client certificates for authenticating requests to an external API in the DXC.

Below is my code to read the certificate from file. This is called twice, once for each certificate. 

       private static X509Certificate2 GetClientCertFromFile(string certName, string password = "")
        {
            byte[] certFile = new byte[0];
            string rootPath = String.Empty;
            try
            {
                rootPath = HttpContext.Current.Server.MapPath("~");
                string certificatePath = $"{rootPath}\\Assets\\Certificates\\{certName}";
                certFile = File.ReadAllBytes(certificatePath);
            }
            catch (Exception e)
            {
                Logger.Error(e.Message, e);
            }
            X509Certificate2 cert = new X509Certificate2();
            if (string.IsNullOrWhiteSpace(password))
            {
                cert.Import(certFile);
            }
            else
            {
                cert.Import(certFile, password, X509KeyStorageFlags.MachineKeySet | X509KeyStorageFlags.PersistKeySet);
            }
            return cert;
        }

Best regards,

Ludvig

Getting RemovedDueToInvalidPrice error

$
0
0

While adding cart to cart service, I have validation from OrderValidationService.ValidateOrder and I am getting RemovedDueToInvalidPrice  error (Item has been removed due to invalid price.). I have set AUD100 to variant price.

Focal point based image cropping for EPiServer using ImageResizing.NET

$
0
0

https://world.episerver.com/blogs/stephan-lonntorp/dates/2016/9/focal-point-based-image-cropping-for-episerver-using-imageresizing-net/

Does anyone have information how to use this plugin. Simply installing it and creating a ImageFile media type does not seem to do anything.

[ContentType(DisplayName = "ImageFile", GUID = "nquid", Description = "")]
[MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png,svg")]
public class ImageFile : FocalPointImageData
{
        /// <summary>
        /// Gets or sets the copyright.
        /// </summary>
        /// <value>
        /// The copyright.
        /// </value>
        public virtual string Copyright { get; set; }
        [Editable(false)]
        public virtual string FileSizeKb { get; set; }
}

When implementing I've tried:

[Display(GroupName = SystemTabNames.Content, Order = 10)]
[UIHint(UIHint.Image)]
[CultureSpecific]
public virtual ContentReference MainImage { get; set; }
//
[UIHint(UIHint.Image)]
[Display(GroupName = SystemTabNames.Content, Order = 10)]
public virtual Url SiteLogotypeUrl { get; set; }

If you read this: https://github.com/defsteph/EPiFocalPoint

It's just supposed to work...

How to submit a form element as boolean instead of string?

$
0
0

Our client is asking for some help with form fields that are submitting to Salesforce via the connector. Everything seems to be passed as a string. "5" instead of 5 for a number and no way to pass a choice as true instead of "true". 

Am I missing something obvious?

Thanks!

Is there a way to choose a default value for a selection field of a form?

$
0
0

I have a dropdown field on a form that is data driven by a selection feed. Is there a way to choose what the default value of the dropdown will be when it loads?


Performance monitoring

$
0
0

As a part of monitoring our servers, i decided to take a close look at our web server cluster. As you all know, EPiServer have some counters of it's own to do this. There is not a lot of documentation about theese, but according to the document "EPiServer Operator's Guide" the counter "Data Factory Cache Hit Ratio" should show the percentage of reads delivered from the cache. The value should be close to 100% during heavy load.

The strange part is that our servers shows an avarage of 105%, which seems a bit odd too me :)
Isn't the counter working correctly, or is it just our servers?

The order of Controls when sending XForm submissions by e-mail

$
0
0

I have created an XForm containing a textbox, two dropdowns, and finally another textbox.

When I receive the submitted XForm in my e-mail, they are in a different order. The content of both of the textboxes are shown first, followed by the content of the dropdowns.

Further testing indicates that the contents of the e-mail is *not* built in the order from the controls collection. (The order from the controls collection is equal to the order of controls in the form.) Instead, it seems that the controls are ordered by their types, so that the e-mail contains the content from all the TextAreas at the beginning, followed by all the Checkboxes, then the Textbozes, and finally the DropdownLists.

Is there any way to configure the XForm in such a manner that the order of the e-mail conent is equal to the order of the form?

(I suppose I could write my own by hooking up to the XForm_BeforeSubmitPostedData event, build and send the e-mail, and suppress the original e-mail, but I was hoping that some built-in functionality already existed.)

Cannot set Changed state to false after updating the Forum

$
0
0

I have tried to update the forum topic as below,

EPiServer.Community.Forum.Topic topic = GetTopic();
EPiServer.Community.Forum.Topic topicClone = topic.CreateWritableClone() as EPiServer.Community.Forum.Topic;
UpdateForumTopic(topicClone);// Edit the forum topic (e.g. change body text etc.) 
topicClone.Changed = topic.Changed; // This could not be done as there is no setter
EPiServer.Community.Forum.ForumHandler.Instance.UpdateTopic(topicClone); // Updating the forum topic will set the Changed state to true

However, I need to preserve the Changed value as it is even after updating the topic. Is there a way to do that?

Additional info on my setup:

EPiServer.Community -  version=9.0.0

Propertylist of Propertylist of page not showing properly

$
0
0

I have a page with Ilist property and the property has Ilist property in it. While displaying in CMS, it shows [object Object],[object Object] in grid. My code looks like below.

	[CultureSpecific]
        [Required]
        [EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<MyPropType>))]
        [BackingType(typeof(MyPropTypeListProperty))]
        [Display(Name = "Something = 11)]
        public virtual IList<MyPropType> MyProps{ get; set; }
       [PropertyDefinitionTypePlugIn]
       public class MyPropTypeListProperty : PropertyListBase<MyPropType>
       {
       }
	public class MyPropType
	{
		[EditorDescriptor(EditorDescriptorType = typeof(CollectionEditorDescriptor<MySecondPropType>))]
      		  public virtual IList<MySecondPropType> MySecondProps{get;set;}
	}
	public class MySecondPropType
	{
	...
	}
 	[PropertyDefinitionTypePlugIn]
   	 public class MySecondPropTypeProperty : PropertyListBase<MySecondPropType>
    	{
   	}

Multiple filter based on different PageTypes in Find Query

$
0
0

Hi,

I am trying to create episerver Find query that requires different filters on different PageType

Here is the scenario

All PageTypes are driven from Abscrtact Class BasePage

so in Episerver Find query its easy to create a filter for all the PageTypes

var query= SearchClient.Instance.Search<BasePage>();

query= query.For("Search Tex"t).InFields(f => f.MetaTitle, f => f.MetaDescription);

query= query.Filter(x => x.ExcludeFromSearch.Match(false));

var batch = query.GetContentResult();

now for the PageType ArticlePageType I need to apply special multiple filters that are only relevant to that ArticlePageType. So how can I achieve this in the same query? the output should be IContentResult<BasePage> 

Viewing all 6894 articles
Browse latest View live