the public interface of PHP Template Inheritance consists of the following functions:
In base templates:
------------------------
start_block_marker()
end_block_marker()
In child templates:
-----------------------
extend()
end_extend()
startblock()
endblock()
get_extended_block()
block_rendering_neccessary()
So far so good...
but actually I'm not so happy with the choice for the similarity of the block markers in the base templates and the child templates... start_block_marker() vs. startblock() and end_block_marker() vs. endblock()... firstly they smell because the first ones got underscores, the second don't, and that somehow seems inconsistent from my perspective...
The bigger problem is the disambiguation: It would be nice if one could judge from the function name if it's a top level marker or a child marker, meant to extend a base marker. Right now it's just not clear from the names.
Django doesn't have this problem because it can just use the same names for top level - blocks and child blocks... but we can't do that, they have to be different functions as of now.
Because right now this project is just fresh off the starting line it would be the best time to change the function names right now.
So please, if you got a good idea for some clear function names, add them to this thread and the might even be in the next release of PHP Template Inheritance (and of course you will be noted in the documentation + the source if you wish to be).
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Welcome visitor,
the public interface of PHP Template Inheritance consists of the following functions:
In base templates:
------------------------
start_block_marker()
end_block_marker()
In child templates:
-----------------------
extend()
end_extend()
startblock()
endblock()
get_extended_block()
block_rendering_neccessary()
So far so good...
but actually I'm not so happy with the choice for the similarity of the block markers in the base templates and the child templates... start_block_marker() vs. startblock() and end_block_marker() vs. endblock()... firstly they smell because the first ones got underscores, the second don't, and that somehow seems inconsistent from my perspective...
The bigger problem is the disambiguation: It would be nice if one could judge from the function name if it's a top level marker or a child marker, meant to extend a base marker. Right now it's just not clear from the names.
Django doesn't have this problem because it can just use the same names for top level - blocks and child blocks... but we can't do that, they have to be different functions as of now.
Because right now this project is just fresh off the starting line it would be the best time to change the function names right now.
So please, if you got a good idea for some clear function names, add them to this thread and the might even be in the next release of PHP Template Inheritance (and of course you will be noted in the documentation + the source if you wish to be).