Reputation: 716
I am quite new to TYPO3 and i am trying to build something which i am not sure how to do!
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):
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.
Right now i have something like this:
<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:
how can i render the right information on the right place?
Thank you!
Upvotes: 1
Views: 148
Reputation: 2262
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>
There are so many tutorials about blog. Have a look at https://docs.typo3.org/typo3cms/ExtbaseFluidBook/3-BlogExample/Index.html
Upvotes: 2
Reputation: 665
When you see the output in your debug, you can use the information in your template. Say your debug output sais the following:
- Blog
> Headline
> Text
You can call these items in your template as {blog.headline}
(for example).
typo3/typo3conf/ext/{extension}/Resources/Private
Folder. Layouts, Partials and Template
folder, and upload these in your fileadmin/{blogmodule}/
folder. Set the path in TypoScript, You'll probably find an example in the plugin documentation.Upvotes: 1