OCtoberCMS 博客插件 Rainlab

OCtoberCMS Blog plugin Rainlab

当我创建一个新的 Post 并在摘录中写入时,新闻页面上的 post 图片就消失了。它只有在我没有摘录的情况下才有效。另外 .. 我如何使用已经写入 css 的现有 类 创建新的 post?

没有摘录 ir 工作得很好。显示我在 post.

上添加的图像和文本

我的代码

<section id="content">

        <div class="content-wrap">

            <div class="container clearfix">



          <div  class="row"> {% component 'blogPosts' %}


          </div>



            </div>

        </div>

    </section><!-- #content end -->

当未定义 excerpt 时,summary 属性将附加到模型。请参阅 https://github.com/rainlab/blog-plugin/blob/master/models/Post.php#L344。如果您的内容以图像开头,则可能是摘要函数启动并生成了图像。

至于CSS部分

我认为您希望覆盖 {% componenent 'blogPosts' %} 的部分设置。根据文档 (https://octobercms.com/docs/cms/components#overriding-partials)

All component partials can be overridden using the theme partials. If a component called channel uses the title.htm partial. We can override the partial by creating a file in our theme called partials/channel/title.htm.

或者,您可以 cmd / ctrl + doubleclick 在 CMS 编辑器中展开默认组件标记。

通过这种方式,您可以编辑标记以匹配您的主题。

如果您想覆盖标记,有一个非常简单的方法。对于图像@CptMeatball 添加了正确的答案,您可以检查一下。

This way you have full control on mark-up and you can edit it.

1.单击展开组件将显示 mark-up 的组件

2。现在您可以添加自己的标记并对其进行编辑。

如有疑问请评论。