osalvador / tePLSQL

PL/SQL Template engine
http://osalvador.github.io/tePLSQL/
MIT License
63 stars 18 forks source link

Need method to identify template by Helper Template name and Block name within TE_TEMPLATES #43

Closed MikeKutz closed 4 years ago

MikeKutz commented 4 years ago

For supporting #36

For reference: The "jinja block" equivalent within tePLSQL is a template. It is a row in TE_TEMPLATES table ; It is the code between an $if false $then ... $end block when stored in a DB Object.

The engine needs to be able to identify which template to pull based on Helper Template name and Block by name. This way, an <%@ embed %> directive can easily override a Template Block.

For templates stored in a DB Object, the Helper Template could be the DB Object name that the template is stored in while the Block name would be identified by ${template_name}.

Within the TE_TEMPLATES table: there is currently no easy way to identify the correct template based on Helper Template name and Block name.

Additionally, the coder may want to use a different "version" of a Helper Template than what this system uses by default. I'll call this piece of information "Class".

MikeKutz commented 4 years ago

K.I.S.S.

actual TE_TEMPLATES.NAME = ${base_name}.${object_type}.${block_name}