Removing Templates in Web Author and Fusion

Having trouble deploying Oxygen XML Web Author? Got a bug to report? Post it all here.
pnoreault
Posts: 4
Joined: Wed Apr 27, 2022 4:40 pm

Removing Templates in Web Author and Fusion

Post by pnoreault »

Hi,
I'm not looking to do a custom framework. I'm looking to remove the out of the box Web Author and Fusion templates, except for two templates. I then want to include two specific templates with helper text for some folks new to DITA. What's the best way to accomplish this ask? I see the instructions on templates. I see the instructions on Frameworks. It's a simple remove and add that I want to do. We already tried to upload our Oxygen framework and we had to revert because is didn't function. With this is there any quick way hide toolbar functionality that shouldn't be used by these new people?
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Removing Templates in Web Author and Fusion

Post by mihaela »

Hello,

Unfortunately there is no possibility for the moment to remove the default templates without creating some extension frameworks.
We will add a feature request in our issues tracker to make this possible and we will update this thread when a solution will be available.

Until then, a faster solution for you would be to use a script that generates an exf for extending each built-in framework to remove the templates. Something like this:

Code: Select all

const fs = require('fs');

var names = ["DITA 2.x","DITA Map 2.x","DITA Map with Resolved Topics","Lightweight DITA - Map","Lightweight DITA - Topic","DITA","DITA Map","DITA-OT Plugin","DITA-OT Project","DITAVAL","DocBook 4","DocBook 5","Docbook Targetset","MathML","SVG","TEI JTEI","TEI ODD","TEI P5","XHTML"];

names.forEach(name => {
  var fileName = 'cf_' + name.replace(' ', '_').toLowerCase() + '.exf';
  fs.writeFileSync(fileName, `<?xml version="1.0" encoding="UTF-8"?>
<script xmlns="http://www.oxygenxml.com/ns/framework/extend" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.oxygenxml.com/ns/framework/extend http://www.oxygenxml.com/ns/framework/extend/frameworkExtensionScript.xsd"
    base="${name}">
  <name>${name} For Content Fusion</name>
  <description/>
  <priority>High</priority>
  <documentTemplates inherit="none"/>
</script>`, 'utf8');
})
Also, for DITA, you can add the new templates that you mentioned.

We already tried to upload our Oxygen framework and we had to revert because is didn't function.
Can you give us more details about the problem you encountered when trying to upload your custom framework?
With this is there any quick way hide toolbar functionality that shouldn't be used by these new people?
Here is a tutorial about removing a toolbar button: https://www.oxygenxml.com/maven/com/oxy ... ction.html

Best Regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
pnoreault
Posts: 4
Joined: Wed Apr 27, 2022 4:40 pm

Re: Removing Templates in Web Author and Fusion

Post by pnoreault »

Doing the scripting work is more complex than extending the out of the box topic and map framework. My limitation is understanding how to write the scripts with the appropriate variables and where to execute the script. There have been others asking about these scripts, as well.

I took the framework that we have extended already and is working in Oxygen. I created one folder and put my .framework files, my DITA templates, my properties files for those templates, my other DITA templates, I added my schematron files. I tested these with the test server locally and they worked fine. I uploaded to Web Author and restarted the server. All of the DITA templates are missing completely from Web Author after the restart. I can't created any DITA content at all.
mihaela
Posts: 490
Joined: Wed May 20, 2009 2:40 pm

Re: Removing Templates in Web Author and Fusion

Post by mihaela »

Hello,

Here are some details about how you can use framework extension script files:
https://www.oxygenxml.com/doc/versions/ ... cases.html
You can directly upload exf based frameworks in Web Author and Content Fusion:
https://www.oxygenxml.com/doc/versions/ ... ework.html

If you want you can send us the framework on support@oxygenxml.com and we can try to reproduce and find the source of the problem.

Best regards,
Mihaela
Mihaela Calotescu
http://www.oxygenxml.com
Post Reply