Create a editor plug-in

Vote:
 

Hi.
First of all let me say that I am new to EPiServer, so I apologize if this post is somewhat unnecessary.

I am trying to follow some of examples in the how to section of the SDK. I am now trying to create a editor Plug-In, something like the make header example. It says that I should add items to UI/Editor/Dialogs, Util/Editor/javascript/ etc. I followed the getting started section, to set up a EPiServer CMS 5 project with VS 2008. The folders this example refer to, is not in my solution. I guess this examples is made for an older version of EPiServer, when it had a different File Structure. Am I missing something here, or are the examples that come with the EPiServer CMS 5 SDK documentation not possible to follow? If there is another way to make plug-ins for the editor in CMS 5, please let me know!

Thanks
Magne Ingvaldsen 

#25572
Oct 30, 2008 10:23
Vote:
 

Hi,

In CMS 5 R2 the UI and Util files have been moved to the Program Files folder and are included with Virtual Path Providers in web.config. Have a look at the section episerver/virtualPath in your web.config file to find out where they are located.

It's of course possible to add your plug-in related files to the Program Files\EPiServer\CMS\... folder found in web.config, but this approach has some implications.

  1. The files you add won't be migrated when you upgrade your site to a new version of EPiServer CMS. An upgrade will only change the virtual path configuration in web.config.
  2. The files you add will be available for all EPiServer sites on the host.

Another alternative is to add your plug-in dependencies to a custom folder in the site, for instance /UIPlugIns/, and then use the overload GetScriptTag(fullPath, false) when adding the script reference to the editor.
To properly secure your dialogs you also have to add a location directive in web.config for your plug-in folder with the same security as the UI folder.

<location path="UIPlugIns">
  <system.web
    <authorization>
      <allow roles="WebEditors, WebAdmins, Administrators"/>
      <deny users="*"/>
    </authorization>
  </system.web>
</location>

You may also want to have a look at Modal Dialogs in the EPiServer UI for Non-IE Browsers for a run-down on creating modal dialogs in EPiServer CMS 5.

/Stefan

#25699
Oct 31, 2008 13:16
Vote:
 

Hi,

Thanks for this post, been struggling a few hours now and was on the verge of pulling my hairs out.

I got this working by setting my own folder up like Stefan said and adding it manually.

 

Thanks,

Vincent

#25709
Nov 03, 2008 10:06
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.