Copy link to clipboard
Copied
As of now, FrameMaker still ships with a dialogue for creating standard templates. These templates are somewhat dated and the dialogue can't be modified.- How difficult is it to create a an alternative template chooser? Which works like the existing one more or less? Perhaps made in Robohelp or "something"?
Copy link to clipboard
Copied
Here is where the template browser files are located. They are actually view-only FrameMaker documents. Years ago, I customized these for a client, but I can't remember how I got them unlocked.
Copy link to clipboard
Copied
What version of FrameMaker are you using?
Copy link to clipboard
Copied
FrameMaker 2022. I believe I have all versions since version 4, actually
Copy link to clipboard
Copied
Is it not made using miml? I believe there was/is an interactive version of mif which can be programmed much like pdf. I played around with a good many years ago. But I have probably lost all documentation regarding this long time ago.
Copy link to clipboard
Copied
The document is saved as MIF and there are a couple of settings to change in there to make it a view-only palette. I have to see if I can find my notes. In the meantime, I will send you an unlocked version that I found in my archives.
Copy link to clipboard
Copied
See page 47 in this document:
https://help.adobe.com/en_US/framemaker/mifreference/mifref.pdf
Copy link to clipboard
Copied
I have described that in detail in the document https://www.daube.ch/docu/files/FM-palettes.pdf
Copy link to clipboard
Copied
Thank you @K.Daube I shall have to read up on this. If I can figure out how it works, it might be an option for integrating my templates in a better way in FrameMaker
Copy link to clipboard
Copied
Sorry, BjĆørn, Ā«I have described that in detail ...Ā» is not sufficient information.
It turns out that for FM versions > 11 the files ($HOME\fminit\maker\tmpltbrw) can not be unlocked anymore with ESC F l k
Although they are still FM-files (file signature <MakerFile 12.0> etc.) they probably have been 'locked' by a different sequence of settings. For example the 'open' MIF file got all settings at once. IMHO the critical setting is
DviewOnlyWinPalette = Yes
The MIF documentation tells about this setting
In Windows versions, a palette floats outside the main application window and cannot be unlocked. To edit the palette, you need to reset the DViewOnlyWinPalette statement to No in the MIF file before opening it in FrameMaker
So we need a script to unlock the newer palettes...
Copy link to clipboard
Copied
I tried to create a script to unlock the palette, but it crashed FrameMaker. A workaround is to programmatically save the palette as MIF and then you can use a text editor to change the DViewOnlyWinPalette statement so that the document can be opened and edited.
Note that you must move the template files to a folder where you have write permission or else the script will fail with an error -42 (System error).
#target framemaker
var regex, doc;
regex = /tmpltbrw/;
doc = app.FirstOpenDoc;
while (doc.ObjectValid () === 1) {
if (regex.test (doc.Name) === true) {
saveToMif (doc, doc.Name + ".mif");
break;
}
doc = doc.NextOpenDocInSession;
}
function saveToMif (doc, saveName) {
var params, returnParams, i;
// Get the parameters to save it as MIF.
params = GetSaveDefaultParams ();
returnParams = new PropVals ();
i = GetPropIndex (params, Constants.FS_FileType);
params[i].propVal.ival = Constants.FV_SaveFmtInterchange;
FA_errno = 0;
// Save the document as MIF.
doc.Save (saveName, params, returnParams);
if (FA_errno === 0) {
return saveName;
}
else {
PrintSaveStatus (returnParams);
}
}
Copy link to clipboard
Copied
After you save the palette documents as MIF, you can open the MIF file with a text editor and change the highlighted values below to No. Then the MIF file will open as an editable FrameMaker document.
Copy link to clipboard
Copied
Rick, I came to the same conclusion.
If I try to change the settings prior to saving the MIF
oDoc.DocIsViewOnly = false;
oDoc.ViewOnlyWinPalette = false;
then FM stalls when entering the first of these lines...
Edit
It turns out that all palettes in FM version < 12 can simply be unlocked with ESC F l k. All palettes of the later FM versions require the procedure with the MIF creation by script.