InstantKB Customization Questions


Hi everyone,

I would like to hide the "Who's on" section and add a column to the articles table (latest/popular). How could I do that?

I'd appreciate your answers.

Thank you
InstantKB Question

Hi There,

Thank you for your post and welcome to the forum. I hope your well :)

I've hopefully assisted below. If I can assist further or provide any additional information please don't hesitate to respond.

Hiding the Who's On

To hide the Who's On panel you'll need to perform the steps below...

1. Navigate to your InstantKB files. Open Skins/{YourSkinName}/Default.ascx
2. Change...

<InstantKB:WhosOnSummary id="ctlWhosOnSummary" runat="Server" />


To

<div runat="server" visible="false">
<InstantKB:WhosOnSummary id="ctlWhosOnSummary" runat="Server" />
</div>


Adding Columns to Latest / Popular Articles

Again within Skins{YourSkinName}/Default.ascx

You will see our latest & popular articles controls. The latest articles control is shown below...

<InstantKB:ViewArticles id="ctlLatestArticles" 
  Text="ViewArticles_LastestAdditions"
  Columns="ArticleIcon,ArticleTitle" .... .... ... />


Both the "Latest" & "Popular" article lists have a "Columns" property. You can add existing built-in columns to these lists by modifying the Columns property on the ViewArticles control within Default.ascx. The columns property accepts a comma delimited list of column names. You can also add custom fields into these views.

To learn which column name to use within the Columns property you can take a look in the database specifically the InstantASP_Fields field. The name you should use is within the "InstantASP_Fields TableFieldName" field.

Please let me know if this helps. If I can assist further don't hesitate to respond,

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Ryan Healey - Friday, March 4, 2016 4:20 PM
Hi There,

Thank you for your post and welcome to the forum. I hope your well :)

I've hopefully assisted below. If I can assist further or provide any additional information please don't hesitate to respond.

Hiding the Who's On

To hide the Who's On panel you'll need to perform the steps below...

1. Navigate to your InstantKB files. Open Skins/{YourSkinName}/Default.ascx
2. Change...

<InstantKB:WhosOnSummary id="ctlWhosOnSummary" runat="Server" />


To

<div runat="server" visible="false">
<InstantKB:WhosOnSummary id="ctlWhosOnSummary" runat="Server" />
</div>


Adding Columns to Latest / Popular Articles

Again within Skins{YourSkinName}/Default.ascx

You will see our latest & popular articles controls. The latest articles control is shown below...

<InstantKB:ViewArticles id="ctlLatestArticles" 
  Text="ViewArticles_LastestAdditions"
  Columns="ArticleIcon,ArticleTitle" .... .... ... />


Both the "Latest" & "Popular" article lists have a "Columns" property. You can add existing built-in columns to these lists by modifying the Columns property on the ViewArticles control within Default.ascx. The columns property accepts a comma delimited list of column names. You can also add custom fields into these views.

To learn which column name to use within the Columns property you can take a look in the database specifically the InstantASP_Fields field. The name you should use is within the "InstantASP_Fields TableFieldName" field.

Please let me know if this helps. If I can assist further don't hesitate to respond,

Thank you Ryan!!

The procedure was really helpful, but I also need to add the columns in the tables within knowledgebase page.... but I can't find it... and also... can you tell me how to set a title for this column?

Thanks again!!!

Hi There,

Thank you for your response. Sorry for my delay.

To change the column names for existing built in fields you can add to these views you can change the field name / column title via the Resources.xml file. This can be found in the root of your InstantKB installation at - Globalization/en-US/Resourcex.xml

For example if you wanted to change to the Assigned To column title to read Delegated To you would change the following value within the Resources.xml file...

<item name="Field_ArticleAssignedUserID">Assigned To</item>


All field names have a key name starting with "Field_" within the Resources.xml file which should hopefully help you easily identify the keys that effect built in field names.

For custom fields you can add via the InstantKB Admin CP to articles or tickets the name of the custom field is used as the column header so this would not require any modifications / changes.

If you wanted to add your own completely unique column into the Latest or Popular lists and don't wish to use a custom field offered by InstantKB this would require some code changes spefically to the following 2 files..

Skins/{YourSkinName}/Controls/ViewArticles.ascx

And the associated code behind...

InstantASP.InstantKB.UI/Controls/ViewArticles.cs

The view articles control is used for all lists of articles shown within InstantKB and custom columns could be added by modifying the two files. You can edit these files with any license - End User or Developer License but you would require Visual Studio if you wanted to modify the ViewArticles.cs file. 

If you don't want to modify source code I'd strongly suggest looking at the custom fields offered by InstantKB to see if one of these could be used for your purposes. It's easy to add custom fields to most views via the InstantKB Admin CP however the two views you are referring to on the homepage would require you modify the Columns property manually within  Skins/{YourSkinName}/Default.ascx as indicated above. .

Please let me know how you wish to proceed and I'll certainly try to assist further.

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Hi Ryan,

I think I didn't explained the point properly...

At home page, the tables for latest and popular articles, load the added column ("ArticleTypeID"), but the header for this column is not displayed



the tag for the field has the value () but is not displayed

Also, I cannot add the column previously mentioned before in the Knowledgebase page. this page is acceded from the tab with the same name.



Thank you for your help.

jrivero_bizagi - Friday, March 11, 2016 4:53 PM
Hi Ryan,

I think I didn't explained the point properly...

At home page, the tables for latest and popular articles, load the added column ("ArticleTypeID"), but the header for this column is not displayed



the tag for the field has the value () but is not displayed

Also, I cannot add the column previously mentioned before in the Knowledgebase page. this page is acceded from the tab with the same name.



Thank you for your help.

Hi There,

Thank you so much for your response and additional information. This makes perfect sense. I tested issue 1 but could not replicate - you can see below the header text appears...



If you don't see this please follow the steps below to resolve...

1. Open Skins/{YourSkinName}/Controls/ViewArticles.ascx

2. Locate the following column....

 <InstantASP:TemplateColumn HeaderText="Field_ArticleTypeID"ItemStyle-Width="60" 
  ItemStyle-CssClass="i-col-light nowrap hide-mobile" HeaderStyle-CssClass="i-col-header nowrap hide-mobile" SortExpression="ArticleTypeID"
  HeaderStyle-HorizontalAlign="Center" ItemStyle-HorizontalAlign="Center">
   <ItemTemplate><InstantASP:Label id="lblType" Runat="Server"/></ItemTemplate>
  </InstantASP:TemplateColumn>


3. Notice the HeaderText property. This contains the key for the text to display from the Resources.xml file. If you open your Resources.xml and search for "Field_ArticleTypeID" you should hopefully see the key. 

If you don't see this you may wish to search for "Field_" within Resources.xml then just below this section add...

<item name="Field_ArticleTypeID">Type</item>


--------------------------

To add the Type field to the Latest & Popular views within the "Knowledgebase" tab you will need to edit the Views via the Admin CP. I've provided further instructions below...

1. Login as an administrator. Visit the Admin CP. Click the "More" option as shown below...



Then expand your "Knowledgebase" tab and select "Manage Views"...



From here you'll see 2 views "Latest" & "Popular" which you can customize. You can add your Article Type field to the Latest & Popular views within the Knowledgebase tab from here...



You can add the article type field like so...

 

I hope this helps point you in the right direction. If I can assist further of course please don't hesitate to respond,

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Hi Ryan

Once again, Thank you for your help you have been really kind and helpful...

The first issue was finally solved. the column ArticleTypeID was not found in In ViewArticles.ascx, but I found ArticleType column instead, so I just simply change the value to ArticleTypeID and it worked perfect.

Related to the second issue, I can't find the manage views options using the admin account. I don't know if this is related to the version, our current version is 2014-1.

Regards!




jrivero_bizagi - Monday, March 14, 2016 3:06 PM
Hi Ryan

Once again, Thank you for your help you have been really kind and helpful...

The first issue was finally solved. the column ArticleTypeID was not found in In ViewArticles.ascx, but I found ArticleType column instead, so I just simply change the value to ArticleTypeID and it worked perfect.

Related to the second issue, I can't find the manage views options using the admin account. I don't know if this is related to the version, our current version is 2014-1.

Regards!



Thank you. I'm pleased this helped :)

With regards to the second issue. Your right. With InstantKB 2014 you may need to click the small arrow icon to the left within the green header bar that runs along the top of all pages within the Admin & Staff CP. 

You can still customize the views i mention in 2014 however accessing the menu shown in my post is slightly different. 

Please let me know if this helps. If I can assist further of course please don't hesitate to respond, 

http://www.instantasp.co.uk/images/line.gif
Kindest Regards,

Ryan Healey



ryan@instantasp.co.uk
www.instantasp.co.uk
Blog | Community | Docs

http://www.instantasp.co.uk/core/assets/images/email/facebook.png http://www.instantasp.co.uk/core/assets/images/email/twitter.png http://www.instantasp.co.uk/core/assets/images/email/google.png http://www.instantasp.co.uk/core/assets/images/email/linkedin.png

Simply perfect!! thank you very much!!! 
GO

Login
Existing Account
Email Address:


Password:


Social Logins

Select a Forum....








InstantASP Forums


Search