Can we create category column same as SharePoint metadata column?

Shubham Salaria asked on August 10, 2017 10:16

Hi Everyone,

Can we create column in page's form for category, similarly as SharePoint taxonomy column. My requirement is that publisher just type the category name in textbox and suggestions should be shown based on typed text. My category structure is too lengthy and complex(parent/child), publishers have to go deeper into category tree structure by clicking on every node which I don't want.

Thanks

Correct Answer

Trevor Fayas answered on August 21, 2017 15:35

Ah, then this would be my fault, i didn't put the ~ at the beginning of the URLs, i never personally use sub sites so i guess it's a bad practice of mine.

Quick fix is to edit the \CMSFormControls\Custom\AdvancedCategorySelector\AdvacnedCategorySelector.ascx and replace lines 5 6 and 7 with the below:

 <script type="text/javascript" src="~/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/js/jquery.js"></script>
        <script type="text/javascript" src="~/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/js/AdvancedCategorySelector.js"></script>
        <link rel="stylesheet" type="text/css" href="~/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/css/styles.css" />
0 votesVote for this answer Unmark Correct answer

Recent Answers


Trevor Fayas answered on August 10, 2017 14:09

advanced category selector on the marketplace, exactly what you are looking for.

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 18, 2017 13:50 (last edited on August 18, 2017 13:51)

Hi Trevor Fayas,

I've imported the ACS for Kentico 10 in my local environment. After that I'm able to create new ACS field in Page type. I'm facing problem in actual form, its not getting render properly and even unable to to search category. Attached is the screen shot for your reference. Image Text

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 18, 2017 15:33

Hey Shubham,

looks like the CSS and javascript files are not there, there were global files with the package that should have been placed, you need to have the following checked when importing:

  • Import Files (recommended)
  • Import Code Files
  • Import Global folders

The global folders has the CSS / javascript, although i probably should have included the files in a sub folder to the form with _files, learned that trick after developing this.

Try re-importing it with those checkboxes and then clear cache and resign macros!

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 21, 2017 08:49

Hello Trevor Fayas,

I did the same earlier and did it again, still I'm getting same behavior. Anything else which I missed during import.

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 21, 2017 09:24 (last edited on August 21, 2017 09:28)

I checked in Chrome developer tool and find that style.css of advance catagory selector is being referencing during page edit but It doesn't contains anything. Here is the screen shot for your reference Image Text

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 21, 2017 14:21

email me at tfayas@hbs.net with the advanced category zip file, I'll send you the right files and if the zip is bad re upload to the marketplace

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 21, 2017 15:29

I checked at following location both css and js are well palced. C:\inetpub\wwwroot\Kentico10_5\CMS\CMSGlobalFiles\CMSFormControls\Custom\AdvancedCategorySelector

I think problem is my current site running under live URL which is http://localhost/Kentico10_5 and reference for css file is http://localhost/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/css/styles.css(empty)

If I use http://localhost/Kentico10_5/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/css/styles.css, its available. But how do I change live URL or any other option/settings.

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 21, 2017 15:54

Thanks Trevor

I put ~ symbol in front of all the references and now the URL is http://localhost/Kentico10_5/CMSModules/Content/CMSDesk/Edit/~/CMSGlobalFiles/CMSFormControls/Custom/AdvancedCategorySelector/css/styles.css

If I add Kentico10_5 at beginning, its working fine. But that's not a best practice.

0 votesVote for this answer Mark as a Correct answer

Trevor Fayas answered on August 21, 2017 16:11

Drat, thought that would work.

I would probably need to adjust them to render the path using a server tag, or get the site not using a virtual path.

I don't have the capacity right now to go in and fix this, can you put Kentico10_5 at the beginning for now and add a note to remove it when you make the site live? I'll add it to my to do list once these major projects clear out.

0 votesVote for this answer Mark as a Correct answer

Shubham Salaria answered on August 22, 2017 09:08

thanks Trevor Fayas for your kind help here. I will put the notes for production deployment.

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.