You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm in the process of re-doing a very large commercial CMS system with twig. After finding twital, -- I'm going to switch it to twital as well so we can begin taking advantage of it's features as well.
One thing I plan on forking/adding is a way to prepend/append to <t:block's, -- I've always thought the {{ parent() }} call was so ugly. If you aren't interested in a feature, -- no worries, I'll maintain my own fork.
However, if you are, ... do you have any suggestions for the syntax? It'll be later this week before I can get to it, but looking at the twital code it should be just a few lines.
It could be a few different ways: ... <t:block name="foo" type="append"> ... <t:blockappend name="foo"> ... or my favorite <t:block append="foo"> with the attributes of replace="name", prepend="name" and append="name" ...
What do you think?
edit: totally missed a sentence
The text was updated successfully, but these errors were encountered:
Probably you will not need to fork the project, you add your own extension to it and register it via extension mechanism. Currently all the twital features are implemented using the same mechanism.
Have a look at the Extension folder in the repo. You can see that also the current block system is implemented in the same way. Here you can find how to register your own extension.
Regarding the feature you suggested, the syntax that i like the most is <t:block name="foo" type="append">. That obviously will also have <t:block name="foo" type="prepend"> and <t:block name="foo"> that will be the original implementation.
To be honest, I do not see a big advantage in the feature, Of course not having the full picture that you have, and the reasons behind it, probably my position is definitively flexible.
Have a looks also the the already implemented t:block-inner and t:block-outer attributes (docs are still missing), they might give you a bigger picture on the "block" problems.
Are you using the library as standalone or with some framework? (symfony?)
Hello! I really enjoy what you've done here.
I'm in the process of re-doing a very large commercial CMS system with twig. After finding twital, -- I'm going to switch it to twital as well so we can begin taking advantage of it's features as well.
One thing I plan on forking/adding is a way to prepend/append to
<t:block
's, -- I've always thought the{{ parent() }}
call was so ugly. If you aren't interested in a feature, -- no worries, I'll maintain my own fork.However, if you are, ... do you have any suggestions for the syntax? It'll be later this week before I can get to it, but looking at the twital code it should be just a few lines.
It could be a few different ways: ...
<t:block name="foo" type="append">
...<t:blockappend name="foo">
... or my favorite<t:block append="foo">
with the attributes ofreplace="name"
,prepend="name"
andappend="name"
...What do you think?
edit: totally missed a sentence
The text was updated successfully, but these errors were encountered: