When you insert the tm element it is set to show "tm". Can I change this to show "reg" instead.
Thanks
Bryon
Solved! Go to Solution.
Thanks for the help Clay. Much appreciated. I jsut happened to b etalking with a different PTC support person on a style sheet issue and mentioned it to them. The other suggestion was to do it via style sheet since there is a tm element.
What I did was
Locate the element tm
Select the context tm everywhere else
Insert new condition
condition type: if
Condition is true if: All test are true
New attribute test
Current element tm
Attribute name: tmtype
Attribute value: Not assigned a value
Go to if attribute "tmtype" = "reg", click on generated text, click edit and select the font element and contents. Copy it, and close.
Go back to the new context you created and click on generated text, click edit and paste over the font element and contents.
Save and exit
This seems to work now.
Bryon
talked with PTC support they suggested an acl script: Here is what I have so far but it does not seem to do the trick yet. I do not get any warning messages anymore that I am missing any arguments, when I open my test topic, but I am missing something.
function change_tm_type_to_reg_callback(doc, tagname, oid, op) {
if (op==1) { return 0; }
if (tagname == "tm") {
oid_modify_attr(oid,"tmtype","reg");
}
}
any help would be great.
Bryon
Hi Bryon--
It looks like you are trying to set up an insert_tag callback. Do you have code somewhere to initialize the callback? It should look something like this:
doc_add_callback(doc, "insert_tag", "change_tm_type_to_reg_callback");
If you want this to always happen, you can replace "doc" with "0" and put it in your init.acl script. Otherwise, you can put it in an ACL file in editinit, and let doc = current_doc().
--Clay
Thanks for the help Clay. Much appreciated. I jsut happened to b etalking with a different PTC support person on a style sheet issue and mentioned it to them. The other suggestion was to do it via style sheet since there is a tm element.
What I did was
Locate the element tm
Select the context tm everywhere else
Insert new condition
condition type: if
Condition is true if: All test are true
New attribute test
Current element tm
Attribute name: tmtype
Attribute value: Not assigned a value
Go to if attribute "tmtype" = "reg", click on generated text, click edit and select the font element and contents. Copy it, and close.
Go back to the new context you created and click on generated text, click edit and paste over the font element and contents.
Save and exit
This seems to work now.
Bryon
Yep, that's definitely another way to go. Glad you got it sorted out.
--C