Any idea why the layouts work perfectly fine in one subcategory:
but not in another?
It’s the tags and specifically this line:
You can either reduce the number of tags or try this:
.topic-list-item .discourse-tags {
display: unset;
}
That will cause them to wrap, hopefully.
(NB inline-block also works but unset works even better in this case)
Thank you so much! That works.
Thanks for nice work.
but
When i tick: Enable right sidebar globally to yes or no there is no timeline on the topic. It is a bug or no ?? (im testing the material theme)
There will be another reason why you’re not seeing the timeline. Please try using the plugin by itself with other plugins and themes disabled.
My Sandbox has this plugin installed, has enable right sidebar globally turned off and you can still see topic timelines, e.g. Test event for bug(?) - Events - Pavilion
Also make sure you haven’t included “topic” in the layouts sidebar right enabled setting.
So much functionality has been provided (you people are great) that it has become rather tough to understand all the options which cross depend on each other (layout vs location plugins) for a power user (but not powerful tech) like me.
But I understand that I shouldn’t bite more than I can chew. But again, can’t help myself when see something new and useful.
I agree! I’m going to be updating the first post of this plugin topic, and my other plugin topics soon with a standardised template that makes it easier to understand the functionality and how to implement it on your site.
If you have any specific use cases in mind for this plugin let me know and I can help you out.
I also was wondering about this.
Can you create the Widgets that will be used by Layouts Plugins in a theme component or do the Widgets have to be created by a Plugin also?
Probably both will work, I’ve created them in plugins.
The only advantage of doing the latter is you can programmatically set up the widget locations in plugin.rb without having to use Admin.
Yes you can!
There’s both a server-side and client-side interface for adding widgets.
Import this function
import { addCustomWidget } from 'discourse/plugins/discourse-layouts/discourse/widgets/sidebar';
Then use it like this in an initializer
addCustomWidget({
name: <widget name>,
position: <side you want it to appear on>,
order: <order relative to other widgets on the same side>
})
Also make sure it’s enabled, either site-wide (in site settings) or for a specific category (in category settings).
有人知道最近是否需要更改此 CSS 吗?我刚更新到最新版本,但 CSS 不再起作用。通过浏览器检查元素时,我仍然看到使用了 .nav-container 和 .locations-map。
祝好。
插件本身没有变化,但 Discourse 的 CSS 可能已更新。
这是话题列表地图对吧?试试
#list-area .locations-map:not(.expanded) {
...
}
谢谢,但没用。几乎把所有元素都加进去了,还是没变化:
.list-area .widget-container .nav-container .leaflet-container .locations-map:not(.expanded) {
height: 750px;
}
已解决:需要添加 !important 注释。感谢您的帮助。
.nav-container .locations-map:not(.expanded) {
height: 750px !important;
}
在我的网站 https://babyforex.net 上运行正常。但是,如果您在主题视图中使用右侧边栏,则不应使用 DiscoTOC:DiscoTOC - automatic table of contents
它是否向我显示了错误——“不存在名为 ‘layouts_sidebar_left_enabled’ 的设置”,我尝试在其中进行的任何设置也出现同样的问题。
能否详细说明您遇到该错误的具体步骤?请提供足够的细节,以便他人能够复现该问题。
您使用的是否为最新的官方 Discourse 构建版本?我们仅支持在 tests-passed 分支上运行的插件。