4

I am having trouble sorting out how to set Url options in fluent configuration. Basically, I want to do this:

[SitecoreField(UrlOptions=SitecoreInfoUrlOptions.AlwaysIncludeServerUrl)]
public virtual Link MyLink{get;set;}

But with fluent configuration. Im using V4.

1
  • Did my answer worked for you? If not please let me know, if yes please mark it as an answer. Aug 7 '19 at 14:55
1

I think you can use the following expression:

x.Field(x => x.MyLink).Configuration.UrlOptions = SitecoreInfoUrlOptions.AlwaysIncludeServerUrl;

And if you want to setup more options then you use the & operator:

x.Field(x => x.MyLink).Configuration.UrlOptions = SitecoreInfoUrlOptions.AlwaysIncludeServerUrl & SitecoreInfoUrlOptions.LanguageEmbeddingAlways;

I did not test yet, but it could work.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.