[Progress Communities] [Progress OpenEdge ABL] Forum Post: RE: Change where custom designer views are located.

Status
Not open for further replies.
M

mavickers

Guest
This is an ancient post but I was looking for the same answer to the last question (relocating the script) myself. I found a way to do it but it isn't pretty - embed the script in your project then change its logical name by editing the project file. For instance, in your example you would have your designerview-simple.js file located under /Widgets/Navigation/Scripts/designerview-simple.js. In Visual Studio right click on the script file and select Properties. On the Properties tab change Build Action to Embedded Resource. After doing that save the project. Then, right click on the project in the solution tab and select Unload Project. After the project unloads right click on the unloaded project and select Edit . When the editor appears do a search for your designer view script file. It should look something like this: Edit this markup so that it looks like this: .Mvc.Scripts.Navigation.designerview-simple.js Save the project file then close the editor window. In the solution explorer, right click the project and select Reload Project. What these steps do is a) embed the script into the project dll and b) moves the resource location for the script to a place in the assembly where Sitefinity looks. You can edit the project file in a different editor instead of going through these steps in Visual Studio. After editing the project file in another editor Visual Studio will prompt you to reload the project, which you should. Further, we are editing the project file in this manner because the properties tab for a file in the solution unfortunately does not allow us to edit the LogicalName property. When loading the designer Sitefinity looks for your corresponding designerview-simple script in /Mvc/Scripts/ /. I believe it looks for it both in the file system and in the assembly. If it is found a call is made to /Frontend-Assembly/ /Mvc/Scripts/ /designerview-simple.js. I believe the call to /Frontend-Assembly figures out where the script resides and serves it accordingly. This is a slightly messy solution but keeps the solution tidy.

Continue reading...
 
Status
Not open for further replies.
Top