Yes yes i know that im not stupid you said that on the first go Like is siad theis approach makes the AE template permanently stupid re deifine the entire procedure its WAY EASIER. Really i wont wirte a example bacuse i dont have time.
anyway you dont seem to understand exactly what you are doing here.
But let me do a assimily imagine me spray painting the wall with a tag. Theres now a tag on the wall. No matter what you project witha overhead projector on top the tag will stay. Thsi is what you do whan you add a item to the AE template gui.
Now if you want the tag to be only on some of the slides you will need to repaint the wall Each and every TIME YOU CHANGE THE SLIDE. For this end you will need to reevaluate the whole AE template file (basically because its the only way you can target the right areas accuarately).
To this purpose you need to add a editorTemplate gui item that HAS the:
QUOTE
-callCustom(-ccu) string string string... create
Specifies that at this point in the template when building the dialog, the procedure specified by the first argument is to be called to create some UI objects when a new node type is edited. The procedure specified by the second argument is to be called if an attribute editor already exists and another node of the same type is now to be edited. The replacing procedure should connect any controls created by the creating procedure to the equivalent attributes in the new node. A list of zero or more attributes specifies the attributes which the two procedures will involve. The procedures should have the signature:
proc AEcustomNew(string attributeName1, string attributeName2)
The number of attributes specified in the call should correspond to the number of attributes in the procedure signature.
(quoted From the manual) Defined. Now then you will need to delete your custom ae gui item each time you load a new node and you will need to recreate it each time too!
Theres plenty of samples in existing templates. Such as the switch nodes. Or indeed the template mechanism tha came form pixar look into the files and read.