I am trying to create a custom data editor (using the AbstractDataEditor class), and i have it mostly working, however i dont know how to link to an internal file.
I would like to open a model popup in umbraco when i click a button, so i am using the following javascript:
Is the file something you have setup as an Emedded Resource in your project? If so you can use something like GetWebResourceUrl to retrieve the path, and use the namespace as the path to the file (ie YourProject.Resources.YourFile.ext)
If it's not an embedded resource, you'll need to copy the file to the Umbraco installation. A common path to use is /umbraco/plugins/<your plugin>/<your file>, then you can sue that as the PATH-TO-FILE
Data Editor - Link to internal file
Hi,
I am trying to create a custom data editor (using the AbstractDataEditor class), and i have it mostly working, however i dont know how to link to an internal file.
I would like to open a model popup in umbraco when i click a button, so i am using the following javascript:
Button btnPopup = new Button();
btnPopup .Text = "Popup";
btnPopup .Attributes.Add("onClick", "UmbClientMgr.openModalWindow('" + PATH-TO-FILE.html + "', 'Browse', true, 800, 600)");
where PATH-TO-FILE represents the path to the internal file of my class library. However, how do i retrieve this path?
Thanks in advance
Regards.
Hi,
Is the file something you have setup as an Emedded Resource in your project? If so you can use something like GetWebResourceUrl to retrieve the path, and use the namespace as the path to the file (ie YourProject.Resources.YourFile.ext)
If it's not an embedded resource, you'll need to copy the file to the Umbraco installation. A common path to use is /umbraco/plugins/<your plugin>/<your file>, then you can sue that as the PATH-TO-FILE
Hope this helps,
Tom
Hi,
Thanks for your reply.
I will place it in the plugins folder if that is common practice :).
Where is the index file for the TinyMCE editor located etc? And where do they "link" to it from the data editor?
is working on a reply...
This forum is in read-only mode while we transition to the new forum.
You can continue this topic on the new forum by tapping the "Continue discussion" link below.