In #Template(name,description),Private,Family(sets) the sets are basically Clarion or ABC, or others, but there doesnt appear to be any symbol in which to extract this info.
I see in the shipping templates, some hidden prompts which had created %AppTemplateFamily where they are assigned either Clarion or ABC, but thats it, it appears to be a work around to the situation that there is no way of finding out the base template from a symbol, or am I wrong?
TIA
Edit.
I should add, I can find out what the template set is from parsing various symbols like %Application, and %ActiveTemplate to see is there is an ABC or Clarion encapsulated in brackets/parenthesis, but I really wanted to find out what the base template or main template was from another template.
Detection of which chain (ABC or Clarion) is somewhat complicated by how far back you want to go. Over the years itās gotton easier, but old code to support older clarion versions is still in play in some cases.
But assuming āsomething modernā (which I think includes C6), all the templates (ABC, Clarion, Ipserver) declare a variable in global scope , %AppTemplateFamily - see Abchain.Tpl for an example. Other templates can test for this (VarExists) and use it.
If you are generting new template chains I would strongly suggest following this pattern (of including an %AppTemplateFamily global prompt.)
Looking at the data I can get out of the various symbols at different sections, ie #Application/#Program aka Global level, and #Module/#Procedure levels the VarExists(%symbol) and then parsing seems to be the only way.
I havent tried VarExists() with an %EmbedIdentifier yet, Iāll give that a go and see what happens, but what you have suggested is what Iām having to use for now.
Just found Registered() as in #If(Registered(āTemplateName(Family)ā) which according to the docs should also work for everything except the #Template template.
Will need to test if the family/chain/set is wrapped in parenthesis like above automatically as another way to detect ABC or CW20.
Yes registered is useful to determine if a template exists. I use this myself in various places.
For example the NeTalk Application wizard checks to see if a bunch of optional templates are available, and if they are offers to add them when creating the app.
In other places, one template might recommend another template, knowing it is available.
Itās not quite what you asked in your original question though.