How do you get Community Posts to appear on home page?

回答済み

4 コメント

  • Wes Drury
    コメントアクション Permalink

    @Jeff - I'll see if I can help you here.

    1.  You can't currently show community topics on the home page unless you do some kind of workaround.  You can easily hard code the HTML and point stuff into your topics which is the easiest way.  You could create categories for each of your topics and redirect the links via curly bars or you could automatically pull them via the API which is the hardest way.

    2.  This would require some development as you would have to pull this from the API.

    You can list the activity of the community by adding a scope statement like below.  This will work on the HomePage.

    {{recent_activity scope='community'}}

    Hope this helps!

    0
  • Diziana
    コメントアクション Permalink

    Hi Jeff

    We remember of doing something in past without using API (because it has rate limit, and we might hit issues if HC sees a lot of traffic). We used an iFrame to embed activities, or other pages; used various javascript tricks to remove header/footer and other things from iframe page.

    Hope that gives you some idea.

    Cheers

    Team Diziana 

    Visit Diziana to download free and premium custom responsive ready-to-use Zendesk theme or Zendesk template or Zendesk plugins for Zendesk Help Center. Brand your Zendesk Help Center, and provide fantastic self-service customer support experience. 

    1
  • James Vreeken
    コメントアクション Permalink

    Just FYI, I was able to get our community topics to show on the homepage using an iframe and some javascript and css trickery.

    https://www.tazsupport.com/hc/en-us

    In your script.js page:

    //put this outside document.ready:

    function resizeIframe(obj) {
    obj.style.height = obj.contentWindow.document.body.scrollHeight + 'px';
    }

    // put his inside document.ready:

    if (window.location.href === "https://www.yourzendesksite.com/hc/en-us/community/topics") {
    if (window.frameElement) {
    $('#communityLinks').siblings().hide();
    $('#communityLinks').parents().siblings().hide();
    $('#communityLinks a').attr('target','_parent');
    $('#communityLinks').addClass('in-iframe');
    setTimeout(function(){
    $('#launcher').hide();
    },1000);
    }
    }

     

    in your community_topic_list_page.hbs put an id on the container of your topics... I put it as communityLinks

    then on the home_page.hbs file add the topics list page as an iframe like this:

    <iframe src="https://www.yourzendesksite.com/hc/en-us/community/topics" style="border:0px #ffffff none;" name="communityTopics" scrolling="no" onload="resizeIframe(this)" frameborder="0" marginheight="0px" marginwidth="0px" width="100%" allowfullscreen></iframe>

     

    Worked for me... its pretty ridiculous that this is the kind of hacks we have to resort to in order to get basic functionality that should be built in... hope this helps someone.

     

    1
  • Jessie Schutz
    コメントアクション Permalink

    Hi James! Thank you so much for sharing your solution!

    0

ログインしてコメントを残してください。

Powered by Zendesk