- class template_engine.gd extends []
-
- static func replace_variable
- Parameters:
-
-
template (String)
-
placeholder_key (String)
-
value (Variant)
-
- Return type:
-
String
- static func render_dictionary
- Parameters:
-
-
template (String)
-
placeholder_key (String)
-
data (Dictionary)
-
- Return type:
-
String
Iterate through the keys in the dictionary and recursively replace placeholders
- static func tokenize_template
- Parameters:
-
-
template (String)
-
placeholder_key (String)
-
- Return type:
-
Array
Tokenizes the template into individual elements for processing
- static func render_forloops
- Parameters:
-
-
template (String)
-
data (Dictionary)
-
placeholder_key (String)
-
- Return type:
-
String
Renders for-loops in the template with the provided data
- static func _render_forloops
- Parameters:
-
-
template (String)
-
data (Dictionary)
-
forloops_block (String)
-
data_key (String)
-
loop_variable (String)
-
loop_content (String)
-
- Return type:
-
String
- static func render_template
- Parameters:
-
-
template (String)
-
data (Dictionary)
-
- Return type:
-
String
Define a static function to render a template with data