Jump to content

Knowledgebase Category title instead of the title ARTICLE


annomander

Recommended Posts

If you go to the Knowledge base page, it has a main heading called category and below that the different category titles, if you click on one of the categorys

 

You go to a list of articles for that category, at the top is the word ARTICLES

 

Is it possible to change this so that the TITLE of the category is before the word ARTICLE

 

I've looked at using the code form KNOWLEDGEBASE.TPL and also the breadcrumbnav as this as the category title in its trail, but theres too much there, the breadcrumbnav must be made up of other page variables, its just knowing how to access them.

 

Also with the new seo, the title is also in the page link, but again its just knowing how to access

 

 

does anyone have any idea to achieve this?

Link to comment
Share on other sites

I'm not a real code person; but I did take a quick look into the TPL files for the KB. I didn't see both KB Article and Category Title in the same file. I could be wrong but I would have to guess that this may not be a native feature; although I am sure its not hard nor impossible.

Link to comment
Share on other sites

  • 1 year later...

It appears the category name is in GLOBALS so I've put this at the top of the knowledgebasecat.tpl

 

{php}

$this->assign('categoryname', $GLOBALS['catname']);

{/php}

 

and then I use {$categoryname} later in that template where I wanted to display the category name. In my case I just replaced the default language completely, but, you could just put it before with a space between to accomplish what you're trying to do.

Link to comment
Share on other sites

  • 1 year later...

The KB Category / Articles text is in the knowledgebasecat.tpl file.

 

Its quite simple and the displayed text depends on whether there are categories and articles, or only articles to display.

 

 

The language file Variable knowledgebasecategories contains the Categories text "Categories"

 

The language file Variable knowledgebaseartciles contains the articles text "Articles"

 

The if /else structure displays whichever is appropriate in the template.

 

Here's simplified code from knowledgebasecat.tpl

{if $kbcats} 
<!--If there are any relevant Categories lets show the $LANG.knowledgebasecategories text -->

<p class="heading2">{$LANG.knowledgebasecategories}</p>

{/if}


{if $kbarticles}
<!--If there are any relevant Articles now show the $LANG.knowledgebasearticles text -->

<p class="heading2">{$LANG.knowledgebasearticles}</p>

{/if}

So, if you simply move around {$LANG.knowledgebasearticles} or {$LANG.knowledgebasecategories} to where you want them, then you should get what you want.

 

As ever, backup your template before you make any changes!

 

 

Trevor

Link to comment
Share on other sites

The KB Category / Articles text is in the knowledgebasecat.tpl file.

 

Its quite simple and the displayed text depends on whether there are categories and articles, or only articles to display.

 

 

The language file Variable knowledgebasecategories contains the Categories text "Categories"

 

The language file Variable knowledgebaseartciles contains the articles text "Articles"

 

The if /else structure displays whichever is appropriate in the template.

 

Here's simplified code from knowledgebasecat.tpl

{if $kbcats} 
<!--If there are any relevant Categories lets show the $LANG.knowledgebasecategories text -->

<p class="heading2">{$LANG.knowledgebasecategories}</p>

{/if}


{if $kbarticles}
<!--If there are any relevant Articles now show the $LANG.knowledgebasearticles text -->

<p class="heading2">{$LANG.knowledgebasearticles}</p>

{/if}

So, if you simply move around {$LANG.knowledgebasearticles} or {$LANG.knowledgebasecategories} to where you want them, then you should get what you want.

 

As ever, backup your template before you make any changes!

 

 

Trevor

Though I was talking about meta tag titles, the ones that show at the browser bar when you visit a website, your message reminded me of something else (sorry for the offtopic):

 

Is it possible to show a message in inside a specific knowledgebase category? Something like

{if $kbcats = "Email"}
message
{/if}

Link to comment
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.

  • 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