一页中的TYPO3博客文章 [英] TYPO3 blog posts in one page

查看:55
本文介绍了一页中的TYPO3博客文章的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我是TYPO3的新手,我正在尝试构建一些我不确定该怎么做的东西!

I am quite new to TYPO3 and i am trying to build something which i am not sure how to do!

我已经安装了T3G/blog扩展. 在我的网站上,我有一个博客"页面,我想要在该页面上显示这样的博客文章(针对每个文章):

I have installed the T3G/blog extension. On my website i have a "Blog" page, where i would like to show the blog posts like this (for each post):

  • 帖子标题
  • 发布日期
  • 完整的帖子内容
  • 帖子作者

我想我必须使用for循环来浏览可用的博客文章,但是我找不到使它起作用的方法.

I imagine i have to use a for loop to go through the blog posts available, but i can't find a way to make it work.

现在我有这样的东西:

<div class="blog__content__left">
   <f:debug>{_all}</f:debug>

   <div class="blog__post__title"></div>
   <div class="blog__post__date"></div>
   <div class="blog__post__content"></div>
   <div class="blog__post__author"></div>

</div> 

调试的输出是一个包含我的帖子的数组,但是现在我的问题是:

The output of the debug is an array with my posts, but now my question is:

我如何在正确的位置呈现正确的信息?

谢谢!

推荐答案

您必须遍历博客的所有帖子.

You have to loop through all posts of a blog.

<f:for each="{blog.posts}" as="post">
    <h2>{post.title}</h2>
    <p>{post.content}</p>
</f:for>

关于博客的教程太多了.看看 https://docs.typo3.org/typo3cms/ExtbaseFluidBook/3-BlogExample/Index.html

There are so many tutorials about blog. Have a look at https://docs.typo3.org/typo3cms/ExtbaseFluidBook/3-BlogExample/Index.html

这篇关于一页中的TYPO3博客文章的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆