最近搜索
没有最近搜索

vijay
已加入2021年4月15日
·
最后活动2021年10月27日
关注
0
关注者
0
活动总数
7
投票
0
订阅
1
活动概览
标记
文章
帖子
社区评论
文章评论
活动概览
的最新活动 vijay
vijay 进行了评论,
Hey Paul , here is the updated code where you only "promoted category name" would be visible. I have used jquery to do so
//remove categories if no promoted articles
$('.section-Promoted').each(function(){
if($(this).find('ul').length)
{
console.log("hello");
}
else
{
$("h3",this).remove();
};
});
and here is template
{{#each categories}}
{{#each sections}}
{{#if internal}}
{{/if}}
{{name}}
{{#if articles}}
{{#each articles}}
{{#if promoted }}
{{/if}}
{{/each}}
{{else}}
{{t 'empty'}}
{{/if}}
{{else}}
{{t 'empty'}}
{{/each}}
{{/each}}
查看评论 · 已于 2015年12月17日 发布 · vijay
0
关注者
0
投票
0
评论
vijay 进行了评论,
Hey, I have a question related to this post. I have to display promoted articles which I am able to do from the above code but what I want is,suppose I have 5 categories and I want to display only those category which has promoted articles and category name . How can I do so?
查看评论 · 已于 2015年12月14日 发布 · vijay
0
关注者
0
投票
0
评论