英文:
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论