Deactivating "ASK A QUESTION" feature in knowledge portal

SatheeshKumar
Kilo Sage

we have recently activated the Knowledge portal in our instance.

 

As a requirement we need to deactivate the "ask a question button" in home page. i tried to find a property/ switch that will make this feauture OFF, but i dont find anything like that.

i f some one has worked on the same kind of functionality, please guide me to the right path.

 

find_real_file.png

 

 

Thanks,

Satheesh

1 ACCEPTED SOLUTION

I guess it is in the html code (c.data.canPostQuestion):

      <div class="kb-action-btns" ng-if="c.data.canCreateArticle || c.data.canPostQuestion">
        <a class="btn btn-default hidden-xs action-btns" role="button" ng-if="c.data.canPostQuestion" href="{{::c.options.post_question_url}}">{{::c.options.post_question_label}}</a>
        <button  type="button" class="btn btn-default dropdown-toggle action-btns" ng-class="{'visibile-xs':c.data.canCreateArticle || c.data.canPostQuestion, 'hidden-lg hidden-md hidden-sm':!c.data.canCreateArticle}" data-toggle="dropdown" aria-label="{{::c.action_menu}}">
          <span class="glyphicon glyphicon-option-horizontal menu-padding"></span>
        </button>
        <ul class="dropdown-menu dropdown-menu-right" ng-if="c.data.canCreateArticle || c.data.canPostQuestion">
          <li ng-if="c.data.canCreateArticle"><a target="_blank" href="{{::options.create_article_url}}">{{::c.options.create_article_label}}</a></li>
          <li class="hidden-md hidden-lg hidden-sm visible-xs" ng-if="c.data.canPostQuestion"><a href="{{::c.options.post_question_url}}">{{::c.options.post_question_label}}</a></li>
        </ul>
      </div>

Un saludo,

Pablo

View solution in original post

6 REPLIES 6

p_espinar
Kilo Guru

If your KBs do not have the Social Q&A activated, that button will not show up,

Un saludo,

Pablo

Thanks for your quick response!

 

Can you please guide to fin d where exactly this check is happening in widget code, i tried to find but iam able to find that.

 

Thanks,

Satheesh

I guess it is in the html code (c.data.canPostQuestion):

      <div class="kb-action-btns" ng-if="c.data.canCreateArticle || c.data.canPostQuestion">
        <a class="btn btn-default hidden-xs action-btns" role="button" ng-if="c.data.canPostQuestion" href="{{::c.options.post_question_url}}">{{::c.options.post_question_label}}</a>
        <button  type="button" class="btn btn-default dropdown-toggle action-btns" ng-class="{'visibile-xs':c.data.canCreateArticle || c.data.canPostQuestion, 'hidden-lg hidden-md hidden-sm':!c.data.canCreateArticle}" data-toggle="dropdown" aria-label="{{::c.action_menu}}">
          <span class="glyphicon glyphicon-option-horizontal menu-padding"></span>
        </button>
        <ul class="dropdown-menu dropdown-menu-right" ng-if="c.data.canCreateArticle || c.data.canPostQuestion">
          <li ng-if="c.data.canCreateArticle"><a target="_blank" href="{{::options.create_article_url}}">{{::c.options.create_article_label}}</a></li>
          <li class="hidden-md hidden-lg hidden-sm visible-xs" ng-if="c.data.canPostQuestion"><a href="{{::c.options.post_question_url}}">{{::c.options.post_question_label}}</a></li>
        </ul>
      </div>

Un saludo,

Pablo

Also, if you do not want to change the code, you can disable Q&A for every of your KB:

 

find_real_file.png

 

find_real_file.png