November Happy Hour will be moved to Thursday December 5th.

Can i use ContentReference property under Custom visitor group CriterionModelBase

Vote:
 

Hi Team,

I have a requirement to implement Visitor groups based on logged in user company. I am going create custom visitor group criterion model class.

But here Companies are maintaining in content structure and i want to use it ContentReference propery while creating vistor groups but It is always showing textbox only. Below is the class which i have created.

[EPiServerDataStore(AutomaticallyRemapStore = true)]
public class CompanyCriterionSettings : CriterionModelBase
{

[Required]
[Display(Name = "Company name")]
public ContentReference CompanyName { get; set; }

/// <inheritdoc/>
public override ICriterionModel Copy()
{
return ShallowCopy();
}
}

Thanks,

Suresh B

#205897
Jul 26, 2019 14:51
Vote:
 

You can try changing your CompanyName property as follows:

[DojoWidget(WidgetType="epi-cms/form/PageInfoPicker"), Required]
public PageInfo CompanyName { get; set; }
#205902
Jul 26, 2019 17:47
Vote:
 

Hi David,

Thanks for the update. Now i am able to see content tree structure to select the page but i am facing another problem here.

My company pagetype content pages doesn't have any controller & view so while configuring the visior group i am not able to select the company content page(this is the message showing "This container is not visible on the website"). Is there any other configuration to enable the selection in this case.

Thanks,

Suresh B

#205911
Jul 29, 2019 9:05
Vote:
 

Hi Suresh

Can you post a screenshot of the issue? Are your company pages defined as Episerver Container pages? 

David

#205918
Jul 29, 2019 11:53
Vote:
 

Hi David,

Company pages created with "PageType". Below is the screenshot. Here i am trying to select "Test Company" page but it was disabled.

Common thing noticed here is, Pages which doesn't have any controller/view are disabled.

Thanks,

Suresh B

#205920
Jul 29, 2019 12:08
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.