TechDocs Content Generator - how to add TOC-Section content automatically?

Hi community,

I want to use a TechDoc Content Generator Method so I can automatically fill the TOC-Section title according to the target language (de/en). In addition I also want to add the element 'TOC' automatically. As soon as users add a new TOC-Section, they shall get the following view.

Unfortunately I right now struggle with both the multilingual title and the 'TOC' element..

My idea was to use something like this:

//MethodTemplateName=CSharp:Aras.TDF.ContentGenerator(Strict);

if (/* document language is German */)
{
  // Add German title
  targetElement.AddChild(this.Factory.NewText("Title", "Inhaltsverzeichnis"));
}
else if (/* document language is English */)
{
  // Add English title
  targetElement.AddChild(this.Factory.NewText("Title", "Table Of Contents"));

}

// Add TOC element
targetElement.AddChild(this.Factory.New????("TOC")); // what do I have to use here?

Would be cool if someone know how to use the ContentGenerator for this purpose. This way all kind of default elements could be automatically filled with default values. Thanks for any hints!

Angela

Parents Reply
  • Unfortunately I just got a spam bot answer so far. Image a world where spammers spends their talents and energy on something meaningful...

    But for some update to this topic. As far as I was able to figure out, content generators right now do not support multi language. The content generator Method only affects the main document. But that´s ok. The translated document is not meant to be editable at all, so this feature would not make much sense.

Children
No Data