pyladoc.inject_to_template#
- pyladoc.inject_to_template(fields_dict, template_path='', internal_template='', template_string='')#
injects content fields into a template. The placeholder <!–CONTENT–> will be replaced by the content. If the placeholder is prefixed with a ‘%’ comment character, this character will be replaced as well.
- Parameters:
fields_dict (
dict
[str
,str
]) – A dictionary with field names as keys and content as valuestemplate_path (
str
) – Path to a template fileinternal_template (
str
) – Path to a internal default templatetemplate_string (
str
) – A template string to use directly
- Return type:
str
- Returns:
Template with included content