Jump to content
cdeese8

How do display nested knowledgebase categories in breadcrumb?

Recommended Posts

Howdy WHMCS Community, using WHMCS 7.4.1 I was wondering how I could tweak / adjust the breadcrump for knowledgebase. It looks like when I use {debug} the top level or parent category isn't loaded on the article page.

kb home > cat 1 > subcat 2 > kb article OR kb home > cat 1 > subcat 2 > subcat 3 > kb article
(what i desire)

kb home > cat 2 > kb article
(what it currently is)

The breadcrumbs just remove and wipe out the parent cat. Might you know of a hook to possible to display full breadcrumb?

Edited by cdeese8
forgot tags

Share this post


Link to post
Share on other sites

Just making a note (was gonna edit but it's locked) that I found a reply from 2010 - and will never link article to multiple cats, instead I'd just create / duplicate a  new article.

  • https://whmcs.community/topic/105901-resolved-breadcrumb-knowledgebase-categories/?do=findComment&comment=554073

 

Share this post


Link to post
Share on other sites

you might be able to do it with http_referrers in a hook, but I suspect no client is going to care that much about the breadcrumbs path... so whether it's worth the effort, i'm not sure.

... and just because Matt said it wasn't possible 9 years ago, doesn't necessarily mean that is still the case today...

Share this post


Link to post
Share on other sites

You could do a ClientAreaPageKnowledgebase hook and  variable replacement on "breadcrumb" and breadcrumbnav with your full path.  You will just need to get the path by querying the database in the hook for the category down the line.

Share this post


Link to post
Share on other sites
19 hours ago, steven99 said:

You could do a ClientAreaPageKnowledgebase hook and  variable replacement on "breadcrumb" and breadcrumbnav with your full path.  You will just need to get the path by querying the database in the hook for the category down the line.

Times like this, I wish I had a nipple to feed me results. lol.

But yea, thanks for providing keywords to assist with R&D. I'll go ahead and search the forums using search query site:whmcs.community hook "breadcrumb" OR "ClientAreaPageKnowledgebase" and see what I can come up with. Thanks steven99 and brian!

Share this post


Link to post
Share on other sites

When I talk developer talk I sometimes get a bit general and just toss out keywords and if your left confused just post what you need more info on as would probably help others.

ClientAreaPageKnowledgebase hook: https://developers.whmcs.com/hooks-reference/client-area-interface/#clientareapageknowledgebase

Database querying is done by a laravel capsule database object like so:

$Category = Capsule::table('tblknowledgebase')->where('id',$CategoryID)->first();

//Get call:
$Category = Capsule::table('tblknowledgebase')->get();

You will need to look at the database structure for knowledgebase.  I believe there are 3 tables for the KB for different purposes -- one for articles themselves, one for categories, and one for linking articles to categories.  Don't recall right off and bit lazy to check .  😉 Would be nice if there was a knowledgebase internal class to use instead of querying the database directly, but oh well.   (well, there could be undocumented ones but haven't looked)

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.


  • Similar Content

    • By McAtze
      Hi everybody,
      i found an issue in knowledgebase articles. When is rate one article i get the message "Thanks for rating the article for us", but if i go now to another article it seems that i have rated this article also. This goes with all articles. If i have rated one article, i've rated all articles.
      I have tested this at my installation and also in the whmcs knowledgebase (https://www.whmcs.com/members/index.php/knowledgebase).

    • By zitu4life
      Hello  there
      I find   this   client   area   searching   on google, I can assume   it is WHMCS 🙄  but i have saw  that  it uses  pictures on knowledgebase client area...from WHMCS  admin  I did not see a way to add pictures.
      Any idea how to add pictures? 
      PS:   I have edit   named   and   some  picture   due to   possible   copyright  and not to  expose   others   website.

       
    • By cdeese8
      How do I display client tickets tablelist (like in clientarea home panel) on knowledgebase.tpl or static page?
      When i explored the /feed/ folder, it doesn't look like anything relevant is there - perhaps data feeds are not available option (https://docs.whmcs.com/Data_Feeds).
      So would I make a hook? That makese sense. I tried to make an includes/hook/display-tickets-help.php file and copy / pasted things I gathered on forums but that's not good. I get oops error and break site.
      Stock theme on WHMCS 7.4.* - this is the hook that is giving me trouble: https://pastebin.com/r1wYxYE7 https://developers.whmcs.com/hooks/hook-index/ https://whmcs.community/topic/284977-hook-to-display-todo-list-to-public-or-logged-in-clients/ tried changing 1 to 0 at the very bottom "add_hook("ClientAreaPage", 0, "display_help_tickets");" (don't think it matters though) Thanks for looking this over if you are thinking about helping out.
      :)
    • By Mahmoud
      Why when I change a page of pages is added meta but in the knowledge base is not there is something? missing
      this is my meta
          {if $metadescription}<meta name="description" content="{$metadescription}" />{/if}
       
      this is my hook
         if ($vars['filename'] == "knowledgebase"){ 
              $metakeywords = $_LANG['keywordsknowledgebase'];
              $metadescription = $_LANG['descriptionknowledgebase'];
          }
       
      is there a problem
       
    • By ScottN
      At the bottom of every Knowledgebase Article, there is a tag symbol, and then two tags "Email, SSL".  It doesn't matter what real tag I have added for the article, it only shows "Email, SSL" for every article.  I have read the documentation on Knowledge Base Tags, but it only talks about the tag cloud (which seems to work OK) but not this end-of-article list of tags. 

      Any pointers on either removing this, or fixing it so it shows the real tags assigned to the article, would be greatly appreciated!
      - Scott
  • Recently Browsing   0 members

    No registered users viewing this page.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated