Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道如何在 elgg 框架中扩展 owner_block 页面元素。我希望它根据使用它的模块显示不同。差异不仅在于不同的菜单项名称,而且更大。我在我的插件视图目录中创建了 page_elements 文件夹,但它在每个模块的每个页面上都更改了 owner_block,并且我希望它(例如)仅在搜索模块中显示我的方式,而不是在仪表板中。
你能帮我么?
你可以使用 if 条件
喜欢
if(get_context() == 'search') { // then show the updates }else{ // just blank }
谢谢..