1
votes

I am new to Umbraco and was wondering what is the best approach to organize content structure to include pieces of dynamicly added blocks on a site. Let's say I have services section on my home page, and there are service item blocks which are dynamicly added/deleted by the content editor through the backoffice. So where do I actually create this services folder, and service items? It must be also taken into consideration that I am developing multilanguage website.

The question is pretty much similiar to this one in the umbraco-forum , but because I develop for multilang, I find it inconvienet to create any other nodes (for settings or these blocks) on the root level, because they will have to be copied to other languages.

So far I think of three ways to do this:

  1. Create services and service item document types, and include them under the Home page node. The disadvantage of this approch is the confusion between "real pages" and this kind of blocks. (though the workaround could be prefixing the name of "data/block" folder with underscore sign, e.g. "_Services")

  2. Create differents folders for "Pages" and for "Blocks" under under Home page node. Then I could use Url rewriting to overcome extra part which are added in the paths for pages. (so for example map "/pages/about-us" to "/about-us"

  3. Use media types for this kind of blocks. About this I am not sure at all, because I see no option to copy items for other languages as it is done in document types.

1

1 Answers

0
votes

The Umbraco resource refers to canvas, which is a feature that allows a content editor to modify content on a page in a WYSIWYG editor style. Canvas is unreliable & has been disowned as buggy & not to be used even on the Umbraco training courses.

You could build a back-office function in a custom datatype (http://umbraco.com/help-and-support/video-tutorials/developing-with-umbraco/data-editors/creating-a-custom-datatype-using-the-usercontrol-wrapper) that mimicked a WYSIWYG editor, but I don't think one currently exists.

The usually pattern when you want blocks of functionality in Umbraco is to use macros. Macro are maintained under the developer section, rather than the content section.

You could also use base extensions (http://our.umbraco.org/wiki/reference/umbraco-base) for dyanmically generated blocks that use Umbraco data.

Whether using a macro or /base you could use some hide/show fields in the affected doc types to show or hide specific blocks on specific pages.