Open bedegaming-aleksej opened 7 years ago
I don't fully get the justification but i had to solve a similar task. Perhaps my approach by using a custom part can help you out in a way or another. You can find the question and answer here: http://stackoverflow.com/questions/37684524/how-to-skip-displaying-a-content-item-in-orchard-cms
+5. The visibility conditions for individual content / menu items are very important for us too @ViRuSTriNiTy Thanks for sharing your solution
The solution I have is slightly different. I am going to submit a pull request with it soon, but in essence, I have a part that interprets layer rules reusing the layer rules engine. Based on the result of the validation the content item is either displayed or hidden. For now, this is done with an empty alternate view. Compared to @ViRuSTriNiTy 's solution, it achieves more flexibility as layer rules could include all sorts of conditions, but, on the other hand, it does mean that even when the content item should not be visible as a result of the rule validation, it would go through the whole handler / driver / etc pipeline anyway. I will investigate if it is possible to combine the best of the two.
A part sounds reasonable, good idea.
As a CMS admin, I want to be able to specify visibility conditions for individual content / menu items in CMS so I do not have to create a separate layer for every item I want to hide under a specific condition. This would allow me to have less content duplication, so it would be easier to manage the site content.
Justification Assume the following situation:
Suggested solution