Site structure
Version 7.x > Site structure > Developing Form Controls View modes: 
User avatar
Certified Developer v6
Certified Developer v6
Nortech - 3/15/2013 3:56:59 AM
   
Developing Form Controls
I am build a number of form controls.

I would like to be able to safely export a control and then import it on another website.

The source code of the control consists of the ascx and ascx.cs files, of course, but the are additional .js and .css files that the control depends on.

Is there a way to include those files when exporting the form control from Site Manager?

I know that for webparts one should put depending files in a subfolder with a name of <control filename>_files. This way the export mechanism can include those files as well.

Is there something similar for Form Control?

User avatar
Kentico Legend
Kentico Legend
Brenden Kehren - 3/15/2013 1:55:00 PM
   
RE:Developing Form Controls
I don't believe those "extra" folders are included. You could place those folders/files in the CMSGlobalFiles folder and export that with your site. You can select the Form Controls but not the associated folders/files. This is a good reference to use.

Might as well ask the question, should the files be included there or maybe in other folders (App_Themes, CMSScripts/Custom, etc.)?

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/25/2013 2:43:05 PM
   
RE:Developing Form Controls
Hello,

As the FroggEye already mentioned... the only place to achieve that is the folder CMSGlobalFiles. It is already mentioned in our Developers Guide: Exporting objects and Folder structure and import/export.

Best regards,
Martin Danko

User avatar
Certified Developer v6
Certified Developer v6
Nortech - 3/26/2013 4:33:17 AM
   
RE:Developing Form Controls
Well, really "CMSGlobalFiles" for a CMSFormControl? Is this recommended? Because I don't see any form controls in the market place using this approach. They all use a "copy files" approach for installing a form control, followed by an "import form control in site manager".

Anyway, exporting a form control with its support files would be very helpful for easy installation of third party form controls. I hope Kentico will consider it as a feature. Its already implemented for webparts anyway.

User avatar
Kentico Customer Success
Kentico Customer Success
kentico_martind2 - 3/29/2013 9:47:12 AM
   
RE:Developing Form Controls
Hi,

Really.. it's recommended way also for the upgrading etc. It doesn't mean that everybody has to use it, especially if you are exporting Controls for other users etc. It's recommend for you own developed controls and other customizations.. It's the safe way.

Anyway, if you want functionality like this available in the feature version of Kentico, you can suggest it and also other users will be able to vote for it (more users = higher priority), on the special page: Kentico UserVoice

Best regards,
Martin Danko