Inhalte aufrufen


Embed most recent blog post on homepage

blog post homepage

  • Bitte melden Sie sich an, um eine Antwort zu verfassen.
1 Antwort zu diesem Thema

#1 nordic



  • Members
  • 23 Beiträge

Geschrieben: 14 October 2016 - 11:20

What I'm trying to do is embed my most recent blog post on home page (and have it automatically change with each new post) with the title, author, and the first few lines from the post.

I'd also like to know how to embed a post in the same way (header, author, beginning of article) automatically.


#2 Marcus Gesing

Marcus Gesing

    SmartStore AG

  • Administrators
  • 3670 Beiträge

Geschrieben: 14 October 2016 - 14:38

At the moment there is only a blog per months and a blog per tags action available. To display it on the homepage, add
@Html.Action("BlogMonths", "Blog")
@Html.Action("BlogTags", "Blog")
to \Views\Home\Index.cshtml.
So you have to code a most recent blog action on your own. But it should be easy to write and similar to the BlogMonths action method.

Schöne Grüße aus Düsseldorf,
Marcus Gesing

Auch markiert mit einem oder mehrerer dieser Schlüsselwörter: blog, post, homepage