Hi,
I have Revo 2.2 with Articles. I have copied the sample.ArticleRowTpl and called it CustomArticleRowTpl this essentially then outputs another chunk that does post layout called FormatPost which I have used elsewhere in the site for this type of layout.
Format post has a few variables: title, date, posted, postHtml
In certain circumstances postHtmlwill not work, see example below:
CustomArticleRowTpl
[[$FormatPost? &title=`<a href="[[~[[+id]]]]">[[+pagetitle]]</a>`
&date=`[[+publishedon:strtotime:date=`%b %d, %Y`]]`
&posted=`[[%articles.posted_by]] <a href="[[~[[*id]]]]author/[[+createdby:userinfo=`username`]]">[[+createdby:userinfo=`username`]]</a>`
&postHtml=`
<p>[[+introtext:default=`[[+content:ellipsis=`200`]]`]]</p>
<p class="links">
<a href="[[~[[+id]]]]" class="readmore">[[%articles.read_more]]</a>
[[+comments_enabled:is=`1`:then=`| <a href="[[~[[+id]]]]#comments" class="comments">[[%articles.comments]] ([[!QuipCount? &thread=`article-b[[+articles_container]]-[[+id]]`]])</a>`]] |
[[+tv.articlestags:notempty=` | <span class="tags">[[%articles.tags]]: [[!tolinks? &items=`[[+tv.articlestags]]` &target=`[[*id]]` &useTagsFurl=`1`]]</span>`]]
</p>
`]]
FormatPost
<div class="post">
[[+title:notempty=`<h2 class="title">[[+title]]</h2>
<p class="meta"><span class="date">[[+date]]</span><span class="posted">[[+posted]]</span></p>`]]
<div class="entry">
[[+postHtml]]
</div>
</div>
It doesn't output anything to the postHtml variable unless I remove these lines from the CustomArticleRowTpl
[[+comments_enabled:is=`1`:then=`| <a href="[[~[[+id]]]]#comments" class="comments">[[%articles.comments]] ([[!QuipCount? &thread=`article-b[[+articles_container]]-[[+id]]`]])</a>`]] |
[[+tv.articlestags:notempty=` | <span class="tags">[[%articles.tags]]: [[!tolinks? &items=`[[+tv.articlestags]]` &target=`[[*id]]` &useTagsFurl=`1`]]</span>`]]
OR I remove the FormatPost call and do the layout all in CustomArticleRowTpl but that then means if the post html formatting changes I have to change it in multiple places which isn't desired...other places in the site use FormatPost which wouldn't be able to use CustomArticleRowTpl
I have no idea if I'm doing something wrong - if this is a limitation. It's confused me completely.
Thanks for your help
Danny