<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://www.aras.com/community/cfs-file/__key/system/syndication/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>khushi さんのアクティビティ</title><link>https://www.aras.com/community/members/khushi</link><description>khushi さんの最近のアクティビティ</description><dc:language>ja-JP</dc:language><generator>Telligent Community 12</generator><item><title>TechDocs Content Generator - how to add TOC-Section content automatically?</title><link>https://www.aras.com/community/f/development/9278/techdocs-content-generator---how-to-add-toc-section-content-automatically</link><pubDate>Tue, 17 Mar 2020 16:17:21 GMT</pubDate><guid isPermaLink="false">916d3f7e-8ddc-42f8-8d45-380822f51406:e66ccac0-dc0b-4696-ac8d-32d4f73ad62d</guid><dc:creator>AngelaIp</dc:creator><description>&lt;p&gt;Hi community,&lt;/p&gt;
&lt;p&gt;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 &amp;#39;TOC&amp;#39; automatically.&amp;nbsp;As soon as users add a new TOC-Section,&lt;span&gt;&amp;nbsp;&lt;/span&gt;they&lt;span&gt;&amp;nbsp;&lt;/span&gt;shall get the following view.&lt;/p&gt;
&lt;p&gt;&lt;img src="/resized-image/__size/320x240/__key/communityserver-discussions-components-files/3/pastedimage1584460948049v1.png" alt=" " /&gt;&lt;/p&gt;
&lt;p&gt;Unfortunately I right now struggle with&lt;span&gt;&amp;nbsp;&lt;/span&gt;both the&lt;span&gt;&amp;nbsp;&lt;/span&gt;multilingual title and the &amp;#39;TOC&amp;#39; element..&lt;/p&gt;
&lt;p&gt;My idea was to use something like this:&lt;/p&gt;
&lt;p&gt;&lt;code&gt;//MethodTemplateName=CSharp:Aras.TDF.ContentGenerator(Strict);&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;if (/* document language is German */)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; // Add German title&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; targetElement.AddChild(this.Factory.NewText(&amp;quot;Title&amp;quot;, &amp;quot;Inhaltsverzeichnis&amp;quot;));&lt;/code&gt;&lt;br /&gt;&lt;code&gt;}&lt;/code&gt;&lt;br /&gt;&lt;code&gt;else if (/* document language is English */)&lt;/code&gt;&lt;br /&gt;&lt;code&gt;{&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; // Add English title&lt;/code&gt;&lt;br /&gt;&lt;code&gt;&amp;nbsp; targetElement.AddChild(this.Factory.NewText(&amp;quot;Title&amp;quot;, &amp;quot;Table Of Contents&amp;quot;));&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;}&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;code&gt;// Add TOC element&lt;/code&gt;&lt;br /&gt;&lt;code&gt;targetElement.AddChild(this.Factory.New????(&amp;quot;TOC&amp;quot;)); // what do I have to use here?&lt;/code&gt;&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;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!&lt;/p&gt;
&lt;p&gt;Angela&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>