AutoNode: An easy way to automatically create nodes in the Umbraco back end

AutoNode: An easy way to automatically create nodes in the Umbraco back end

Umbraco doesn't (yet) support automatic node creation out of the box. But that's a problem we've been facing more often than not - we use grouping nodes that are expected to be there in order for our site to function correctly. For example, in the image below, you can see that under the "Blog" node there are three grouping nodes required for it to work correctly: Posts, Authors, and Categories. Wouldn't it be great if they were created automatically as soon as the "Blog" node was created?

In other scenarios, you may need some nodes automatically created under each and every one of your pages - I've seen setups with subnodes for "Images", "Files" etc. that had to be there. Of course, there are other alternatives like pickers etc. but that depends on the context and what you need to do - so I've worked with some sites which needed this functionality.

 Enter Autonode - we created a simple plugin that allows you to specify a set of rules for automatically creating nodes - either in code or in a config file - and lets Umbraco handle the rest for you. You can tell it that you need a node of type B created under a node of type A, and next time you create your "A" node, "B" will be there.

This has an added benefit - if the "B" node is accidentally deleted (e.g. by an administrator), then next time you publish the parent node, "B" will be there again. This ensures that the site's code that may be dependent on the existence of "B" will not throw exceptions.

What's more, the plugin ensures (if you choose so) that your automatically-created node(s) will always be first in the subnode tree, even if there are other nodes present. 

This plugin works by letting you specify rules for node creation - either in a configuration file or in code.

Get the source code at GitHub

Download the package from Our Umbraco

(Cross posted from DotSee Umbraco & DNN Services Blog)

To view or add a comment, sign in

More articles by Sotiris Filippidis

Insights from the community

Others also viewed

Explore topics