Page 1 of 1

Button disappears when using custom framework in Web Author

Posted: Tue Nov 12, 2019 6:51 pm
by grethelgomez
Hi,

We use custom frameworks for the DITA maps and topics in the desktop app to add some buttons, and to set the templates and Schematron rules to use.
However, when uploading these frameworks to Web Author, the button 'Create a new DITA resource and insert a reference to it' disappears when viewing a map, even though we can see it in the desktop app.

When checking the .framework file, we can see that the button is listed:

Code: Select all

<action>
    <field name="id">
        <String>insert.new.dita.resource</String>
    </field>
    <field name="name">
        <String>${i18n(insert.new.dita.resource)}</String>
    </field>
    <field name="description">
        <String>${i18n(insert.new.dita.resource_description)}</String>
    </field>
    <field name="largeIconPath">
        <String>/images/NewTopic24.png</String>
    </field>
    <field name="smallIconPath">
        <String>/images/NewTopic16.png</String>
    </field>
    <field name="accessKey">
        <String>N</String>
    </field>
    <field name="accelerator">
        <null/>
    </field>
    <field name="actionModes">
        <actionMode-array>
            <actionMode>
                <field name="xpathCondition">
                    <String>self::*[contains(@class, " map/map ") or contains(@class, " map/topicref ") 
                                  or contains(@class, " map/relcell ") or contains(@class, " map/relcolspec ")]
                     </String>
                </field>
                <field name="argValues">
                    <serializableOrderedMap/>
                </field>
                <field name="operationID">
                    <String>ro.sync.ecss.extensions.dita.map.topicref.InsertNewTopicOperation</String>
                </field>
            </actionMode>
        </actionMode-array>
    </field>
    <field name="enabledInReadOnlyContext">
        <Boolean>false</Boolean>
    </field>
</action>
If we don't set the custom framework, then we can see the button when viewing maps, but we cannot see the custom templates when using this button.

How can we set up the custom framework to show the button 'Create a new DITA resource and insert a reference to it' and to be able to see our custom templates when using it?

Thanks!
Grethel

Re: Button disappears when using custom framework in Web Author

Posted: Thu Nov 14, 2019 3:56 pm
by mihaela
Hi,

We managed to reproduce the problem. This happens when the extension framework file does not contain the "ditamap" text in the name.
I registered an issue in our internal issue tracker and we will try to handle better this sittuation.

Please make sure that your ".framework" file contains the "ditamap" keyword and test again. Let us know if the problem still persist.

Best Regards,
Mihaela

Re: Button disappears when using custom framework in Web Author

Posted: Mon Nov 18, 2019 11:23 pm
by grethelgomez
Hi,

Changing the name of the framework to include the word 'ditamap' did work. I'm able to see all the buttons set in the custom framework. Thank you!

However, there is another problem. When using the button 'Create a new DITA resource and insert a reference to it', our custom templates are not listed among the options in the New window.

Our objective is to show our DITA topic templates the same way they are shown in the window Choose Template after clicking New in the SharePoint tab. These templates were added through our custom framework for topics.

I also tried linking the templates to the custom framework for ditamaps, but they still don't show. Besides, this approach has two inconveniences. First, we only offer templates for topics not maps. Second, because we link both frameworks, the one for topics and the one for maps, to the same template folder, these templates are shown more than once in the Choose Template window, under the section of each of the custom frameworks accordingly.

How can we get our topic templates added through the custom framework for topics, to show among the template options in the New window after we click on the button insert.new.dita.resource?

Thanks!

Re: Button disappears when using custom framework in Web Author

Posted: Tue Nov 19, 2019 10:02 am
by mihaela
Hi,

I'am glad that the problem with your custom framework actions is solved.

Your templates will appear in the new DITA topics dialog if the properties files associated with your templates contain the type property set to dita: https://www.oxygenxml.com/doc/ug-editor ... lates.html

Best Regards,
Mihaela

Re: Button disappears when using custom framework in Web Author

Posted: Tue Nov 19, 2019 6:45 pm
by grethelgomez
Hi Mihaela,

We hadn't been using the properties files. This fixed the problem. Thank you!

Grethel.