The_Cthulhu_Kid
The_Cthulhu_Kid

Reputation: 1859

Creating a custom pop up for Umbraco back office

[Final EDIT] Here is a link to the code I wrote in case it helps anyone.

I think I have a solution. Umbraco uses asp.net files for their popups which is something I haven't used yet but I think I can get the hang of it. I don't know how to access the aspx from within my class, should I make a code behind partial class?

Thanks for any help.

I am developing a multi-lingual site, using Umbraco, where content nodes are automatically copied to each language as they are created. Is there any way to implement a custom popup to confirm that it should be copied to all instead?

This wouldn't actually be on the site, rather in the back office.

Or is it possible to open a browser popup with c# as all I really need is a bool value from a message box?

[EDIT: added possible solution]

Upvotes: 1

Views: 1682

Answers (1)

The_Cthulhu_Kid
The_Cthulhu_Kid

Reputation: 1859

I sorted this by adapting Umbraco's own create function. I made a new .aspx file and added the functionality that I needed to the code behind.

I was able to add a context menu item that allowed me to call my new page and from there called a method to duplicate the content.

From the method, I pass the new node and get the parent id. Then I compare all the node names for those that match and use the umbraco document.copy() method to recreate the content under each language at the correct position.

If I can make the code more generic then I will upload it as a package to Umbraco.

Upvotes: 1

Related Questions