최근 검색


최근 검색 없음

info's Avatar

info

가입한 날짜: 2021년 10월 22일

·

마지막 활동: 2021년 10월 22일

팔로잉

0

팔로워

0

총 활동 수

10

투표 수

5

플랜 수

0

활동 개요

님의 최근 활동 info

info님이 에 댓글을 입력함

커뮤니티 댓글 Feedback - Help Center (Guide)

Ewwww, this looks ugly. I created a gist instead here: https://gist.github.com/primozcigler/678b74c1e0262a1d4cb7

If there is a larger demand for this I can also write more in-depth tutorial how to do it properly and cover more use cases.

댓글 보기 · 2015년 6월 09일에 게시됨 · info

0

팔로워

2

투표 수

0

댓글


info님이 에 댓글을 입력함

커뮤니티 댓글 Feedback - Help Center (Guide)

I have figured a workaround and used Zendesk API to show 1 article in multiple sections.

My usecase: we are selling WordPress themes and we have multiple niche themes (around 10 ATM). There are some specific questions for each theme, but most questions are common and related to all the themes (for example How to add Google Analytics to WordPress site). So I created a new section called Common problems and appended the articles from that section to each section of the themes.

Demo - there is a list of sections for each theme, but if you will click to the sections, you'll notice that first there are theme-specific questions and later on all questions from section Common problems.

JS code (mind that I am using Underscore.js):





// fix to display general questions in themes' sections  
 // using Zendesk API  
 // @link https://developer.zendesk.com/rest\_api/docs/help\_center/articles#list-articles  
 (function() {  
 if ( $( '.breadcrumbs a[href\*="200506781"]' ).length ) { // 200506781 is ID of the section for general questions  
 var config = {  
 $articleList: $( 'ul.article-list' ),  
 tmpl: \_.template( '
  • <%- title %>
  • ' ), apiUrl: 'https://proteusthemes.zendesk.com/api/v2/help\_center/sections/200132421/articles.json', }; var appendArticles = function( data ) { \_.each( data.articles, addArticle ); }; var addArticle = function( article ) { config.$articleList.append( config.tmpl( { title: article.title, url: article.html\_url, } ) ); }; $.get( config.apiUrl, '', appendArticles ); } })(); // hide dummyhide articles - if section has 0 articles fix (function() { $( '.article-list a[href\*="dummyhide"]' ).parent().remove(); })();

    댓글 보기 · 2015년 6월 09일에 게시됨 · info

    0

    팔로워

    0

    투표 수

    0

    댓글


    info님이 에 댓글을 입력함

    커뮤니티 댓글 Feedback - Help Center (Guide)

    +1 for example

    댓글 보기 · 2015년 6월 03일에 게시됨 · info

    0

    팔로워

    1

    투표

    0

    댓글


    info님이 에 댓글을 입력함

    커뮤니티 댓글 Feedback - Help Center (Guide)

    @Alex Man: Are you sure? I am already checking out the competition, it might be better option for us.

    댓글 보기 · 2015년 5월 25일에 게시됨 · info

    0

    팔로워

    0

    투표 수

    0

    댓글


    info님이 에 댓글을 입력함

    커뮤니티 댓글 Feedback - Help Center (Guide)

    +1 for this. We would need this as soon as possible and it is the most painful bug we are experiencing in the whole zendesk.

    댓글 보기 · 2015년 5월 21일에 게시됨 · info

    0

    팔로워

    1

    투표

    0

    댓글