Model.Content.ShowToVisitor() is always true regardless of the criteria
Hi,
I am using this package with Umbraco(v7.2.1) and with Standard Website MVC(v2.0) Package. I have added personalisation group picker to Content Master document type so that this property can be set to all pages. Now I have added different Personalisation Group to different pages and edited the tempate Standard Page as below to check criteria before displaying page.
But Content.Model.ShowToVisitor() always evaluates to true. In the Package it is mentioned to be compatible with .NET 4.0 but mine framework is 4.5. This can also be causing issues. There is a binary file error while installing the package which I have noticed as below
What's the name of the alias you have used for your personalisation group picker?
I don't think the missing dll is the cause of the problem - realise I need to add that to the package which I'll do, but it's only going to be a problem if you use the country criteria.
I missed out the part of Group Picker Alias from the description of this package, I realised this after reading your reply. It was conditionalCheck before, I changed it to "personalisationGroups" as mentioned in the description and everything is working fine. Thanks.
Model.Content.ShowToVisitor() is always true regardless of the criteria
Hi,
I am using this package with Umbraco(v7.2.1) and with Standard Website MVC(v2.0) Package. I have added personalisation group picker to Content Master document type so that this property can be set to all pages. Now I have added different Personalisation Group to different pages and edited the tempate Standard Page as below to check criteria before displaying page.
@if(Model.Content.ShowToVisitor())
{
<div id="mainContent" class="fc">
<div class="navigation">
@Html.Partial("LeftNavigation",@Model.Content)
</div>
<div id="content">
@Html.Raw(Model.Content.GetPropertyValue<string>("bodyText"))
</div>
@Html.Partial("ContentPanels",@Model.Content)
</div>
}
else
{
<div id="mainContent" class="fc">
<div id="content">
Not Allowed
</div>
</div>
}
But Content.Model.ShowToVisitor() always evaluates to true. In the Package it is mentioned to be compatible with .NET 4.0 but mine framework is 4.5. This can also be causing issues. There is a binary file error while installing the package which I have noticed as below
What's the name of the alias you have used for your personalisation group picker?
I don't think the missing dll is the cause of the problem - realise I need to add that to the package which I'll do, but it's only going to be a problem if you use the country criteria.
Okay,
I missed out the part of Group Picker Alias from the description of this package, I realised this after reading your reply. It was conditionalCheck before, I changed it to "personalisationGroups" as mentioned in the description and everything is working fine. Thanks.
Great. You can add a config key if you want to use your original alias. And just to note, have released another version with the missing dll in.
is working on a reply...