최근 검색
최근 검색 없음

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
댓글