You are not logged in Log in Join
You are here: Home » Members » andym » Get a list of valid dtml-tags

Log in
Name

Password

 

Get a list of valid dtml-tags

An external method to get a list of dtml tags that are valid, so that when you are desingning products to be installed on a client you can use custom dtml tags if present.

from DocumentTemplate.DT_String import String

def test(self):
	msg = ''
	for command in String.commands.keys():
		msg = msg + command + "\n"
	return "%s" % msg

String contains a dict called commands, when a tag is registered, it adds to this dict "String.commands['foo'] = FooTag".