📄️ Template Funcs - Intro
Basic functions from the Golang standard library and their improved usage in the GoFrame framework. Practical examples demonstrate how to pass parameters between different template functions and how to flexibly call functions. The usage of and, or, not, call, index functions, as well as the improved automatic type conversion for eq/ne/lt/le/gt/ge comparison functions in the GoFrame framework, are detailed.
📄️ Template Funcs - Built-In
Introduction to the built-in functions used in templates within the GoFrame framework. These functions can be used for mathematical calculations, HTML and URL escaping, string processing, date formatting, and data format conversion, including functions like plus, minus, times, divide, enhancing development efficiency.
📄️ Template Funcs - Custom
In the GoFrame framework, developers can define custom template functions and globally bind them to specified view objects. Additionally, custom objects can be assigned to templates, allowing method calls on these objects. The sample code demonstrates how to define and bind template functions, and how to pass parameters for template parsing in both regular and pipeline ways.