简体   繁体   English

新闻应用程序如何将类别与用户角色结合起来

[英]News app how to couple categories with userroles

I am setting up news with the 2sxc news app. 我正在使用2sxc新闻应用设置新闻。 We have multiple categories and some of the categories are only visible for certain userroles, how can I fix this? 我们有多个类别,某些类别仅对某些用户角色可见,我该如何解决?

What we have tried is diffent modules showing different cateogries but this was not the wish of the client, they want 1 list of news with multiple categories in there. 我们尝试的是显示不同类别的不同模块,但这不是客户的愿望,他们想要1个具有多个类别的新闻列表。

For example: A non-user can see the News category articles. 例如:非用户可以查看新闻类别的文章。 But a subscriber can see the News, Downloads and Publications articles. 但是订阅者可以查看新闻,下载和出版物文章。

But how do I achieve this in 1 list view? 但是如何在1个列表视图中实现呢?

The expected result is that we can name per category what the userrole or roles are which are allowed to see the content. 预期的结果是我们可以为每个类别命名允许查看内容的用户角色或角色。 And that it will be filtered out in the list view. 并且它将在列表视图中被过滤掉。

If I understand you correctly, you want the output view to show certain categories but not others. 如果我对您的理解正确,则希望输出视图显示某些类别,而不显示其他类别。 For this, the output view must filter the categories it provides. 为此,输出视图必须过滤其提供的类别。 You can either hardwire this in the view with if-then statements, or add fields to your categories like ShowToAll and then filter by this. 您可以使用if-then语句在视图中进行硬连接,也可以将字段添加到ShowToAll之类的类别中,然后按此进行过滤。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM