1

Is there a way to let the users decide where to put a child document type on a page? With a template this is possible on a fixed location on a page. But I want it for example between two paragraphes of a text.

For example:

I have a div with a red background. This div needs te be placed on a page via a rich text editor, without knowing anything of html or css. So I create a document type 'Red Content'. When the user creates this document type as child of the current page, he has to choose the exact location of that page in the rich text editor.

Thanks in advance!

Sllix
  • 606
  • 9
  • 28

2 Answers2

0

Document types define & store the data for an instance of a page - templates then lay out this data for the visitor to see. You can have many different templates for a single document type - so you could define every possible position for your information and then choose the layout that suits you?

If you really want you could hide your red div and then let your user use some placeholder text - something like $$$$$$ - and then use jquery to replace the placeholder text with your red div if the placeholder exists.

amelvin
  • 8,919
  • 4
  • 38
  • 59
0

Based on my understanding of your question, you can created and make a macro available to the user that would only insert the content of your "Red Content" node. This macro would then be able to be inserted into the richtext editor at the location determined by the user. Additionally, if there are to be more than one "Red Content" child nodes, you could implement a picker or add options/parameters to your macro to allow for selection.

You did not specify whether you are using Razor or XSLT, but the basic steps are the same. When creating your macro or editing to make it available, simply check the "use in editor" checkbox on the Macro Properties.

Your users will then be able to click the "Insert Macro" button (Umbraco 6 insert macro button).

If you have any questions or can provide additional details, I may be able to be more specific with the method.

Hideous1
  • 126
  • 7