如何在没有用户登录的情况下显示具有fe_group限制的记录?

huangapple go评论65阅读模式
英文:

How to show record with a fe_group restriction even though no user is logged in?

问题

"你能给我指点一下,我该如何实现类似这样的功能 -
“即使没有用户登录,这个扩展也能够渲染具有 fe_group 限制的新闻记录。
通过使用自定义 ViewHelper,可以在视图中检查新闻记录是否应完全显示,或者只是一个摘要和指向登录表单的链接。”
来自这个扩展 - https://docs.typo3.org/p/georgringer/news/main/en-us/Addons/NewsFegroupPreview/Index.html#
但不仅限于新闻,还适用于我的自定义扩展和各种记录。
我以前从未使用过 fe_groups。
据我理解,所有的魔法都将在这些“使用自定义 ViewHelper”中完成))
我需要在哪里更改我的内容行为,并将其显示为预览块,而不是标准的 TYPO3 行为。
这是 TYPO3 9.5"

英文:

Could you give me a direction of think how I can make something like this -
"This extensions makes it possible to render news records with a fe_group restriction even though no user is logged in.
By using a custom ViewHelper it is possible to check in the view if the news record should be shown fully or e.g. just a teaser and a link to the login form."
From this ext - https://docs.typo3.org/p/georgringer/news/main/en-us/Addons/NewsFegroupPreview/Index.html#
But not only for the news, but for my own extension and kind of records.
I've never working before with fe_groups.
As I understand all magic will be inside these "using a custom ViewHelper" ))
Where I need to change behaviour for the my content and show is as preview block, instead of standard TYPO3 behaviour.
This is TYPO3 9.5

答案1

得分: 1

你可以移除组的约束并实现一个自定义的约束。

英文:

The restrictions should help you https://docs.typo3.org/m/typo3/reference-coreapi/main/en-us/ApiOverview/Database/RestrictionBuilder/Index.html#custom-restrictions

you can remove the constraint for the group and implement a custom one

huangapple
  • 本文由 发表于 2023年7月27日 21:01:04
  • 转载请务必保留本文链接:https://go.coder-hub.com/76780007.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定