I have a blog using Articles and I have the usual (text based) posts which are shown on the blog page through a rowTpl
. This contains the articles title, an image, author, teaser text, etc. and of course a link to view the whole post.
rowTpl
<article class="post style2">
<div class="content">
<header>
<span class="category">by <a href="[[~[[*id]]]]author/[[+createdby:userinfo=`username`]]">[[+createdby:userinfo=`username`]]</a> on [[+publishedon:strtotime:date=`%b %d, %Y`]] [[+tv.articlestags:notempty=` | [[%articles.tags]]: [[!tolinks? &items=`[[+tv.articlestags]]` &target=`[[*id]]` &useTagsFurl=`1`]]`]]</span>
<h3><a href="[[~[[+id]]]]">[[+pagetitle]]</a></h3>
</header>
[[+introtext:default=`[[+content:ellipsis=`200`]]`]]
<ul class="actions">
<li><a href="[[~[[+id]]]]" class="button next">Read More</a></li>
</ul>
</div>
<div class="image" data-position="center"><img src="[[+tv.article-img]]" alt="" /></div>
</article>
Now I also want to display videos within the same blog feed but obviously without a teaser text for example. Ideally I would embed the video, so it can be viewed from this page directly and there’s no need to click any further to watch the video. Therefore I would like to use a different rowTpl
for the video posts.
I know I can assign every post itself to a unique template but I don’t seem to be able to distinguish that on the blogs feed. My question therefore is: How can I display blogs and videos within the same feed but using different container templates?
Important is, that the videos should be created as an articles resource, so all the contents of the blog (posts and videos) are chronological sorted and accessed through the same thing.
My approach so far is that I could assign a video
tag to all video posts but then again I don’t know how I would go about showing them differently in the feed. Any ideas?