# |
May 25th 2017, 20:25 |
inoas |
plugin_type_uuid_revision-uuid.twig |
# |
May 25th 2017, 20:25 |
inoas |
cause my twig files come from the database and look like FlexiCms_document_76ad7ef8_863b_456b_9490_c63d6ce0657a_76ad7ef8_863b_456b_9490_c63d6ce0657a.twig |
# |
May 25th 2017, 20:25 |
meder_ |
hm the id is blank yeah |
# |
May 25th 2017, 20:25 |
inoas |
I am not sure... I really would want to have twig template loading... like loading from a base template - but that won't be so easy |
# |
May 25th 2017, 20:24 |
WyriHaximus |
Yeah TwigView is designed to cover a lot more cases :) |
# |
May 25th 2017, 20:24 |
meder_ |
https://gist.github.com/anonymous/70f9f90f2830ecf9614cc4f2a3cf6f28 jeremyharris |
# |
May 25th 2017, 20:23 |
inoas |
I am just reusing the idea how to get helpers loaded <3 and the extensions :) |
# |
May 25th 2017, 20:23 |
inoas |
TwigView does a lot more |
# |
May 25th 2017, 20:23 |
inoas |
so I do not need to catch all kind of cases |
# |
May 25th 2017, 20:23 |
inoas |
well at least my stuff is tightly integrated |
# |
May 25th 2017, 20:22 |
WyriHaximus |
Aye, and if it doesn't, adept and release a new (major) verison |
# |
May 25th 2017, 20:21 |
inoas |
go the long run ;p? |
# |
May 25th 2017, 20:21 |
WyriHaximus |
inoas: awesome sounds great :D, only one way to find out how it works out in the long run ;) |
# |
May 25th 2017, 20:20 |
jeremyharris |
meder_ I think you are misusing $id there, as it is setting the id of the attachment. you should leave it empty so it is automatically associated with Results |
# |
May 25th 2017, 20:19 |
meder_ |
ok sec |
# |
May 25th 2017, 20:19 |
inoas |
but I am still unsure if the way I do things is good in the long run |
# |
May 25th 2017, 20:19 |
jeremyharris |
yes |
# |
May 25th 2017, 20:19 |
meder_ |
jeremyharris: $attachments is line 20, its not an entity its just a raw php array with the ids/fields |
# |
May 25th 2017, 20:19 |
inoas |
like say {{ Html.css('/assets/vendor/node_modules/marx-css/css/marx.min.css')|raw }} |
# |
May 25th 2017, 20:19 |
inoas |
and I could reuse all the nice extensions you build :) |
# |
May 25th 2017, 20:18 |
jeremyharris |
meder_ can you please gist $attachments at that point, as well as $patchedEntity |
# |
May 25th 2017, 20:18 |
inoas |
so all that's nice... |
# |
May 25th 2017, 20:18 |
inoas |
and the twig templates that reside in my database are already written as twig files, then again cached by twig loader |
# |
May 25th 2017, 20:18 |
meder_ |
eg $entity['attachments'] = array_merge ( $entity['attachments'], $attachments ); |
# |
May 25th 2017, 20:18 |
meder_ |
do I just need to "patch" $entity['attachments'] with line 25? |
# |
May 25th 2017, 20:18 |
inoas |
WyriHaximus: I can already use helpers, and extensions that you supply |
# |
May 25th 2017, 20:18 |
jeremyharris |
so that’s why using ‘associated’ showed no difference |
# |
May 25th 2017, 20:18 |
meder_ |
ok |
# |
May 25th 2017, 20:17 |
jeremyharris |
first level associations are patched by default |
# |
May 25th 2017, 20:17 |
meder_ |
i actually just found it's not using the associated table in the 'associated' call, weird |
# |
May 25th 2017, 20:17 |
meder_ |
jeremyharris: it has a ton of internal stuff, i pretty much replicated it there |
# |
May 25th 2017, 20:17 |
inoas |
and every element can have its own twig template |
# |
May 25th 2017, 20:16 |
meder_ |
https://gist.github.com/anonymous/36f6b41353aceaacbb7b01a653418ab0 |
# |
May 25th 2017, 20:16 |
inoas |
basically m document consist of multiple (translatable) elements, and each can be a module => small xml snipplet... which then fires a cakephp cell in the background |
# |
May 25th 2017, 20:15 |
inoas |
I will have something that maps to cells... |
# |
May 25th 2017, 20:15 |
inoas |
this is how I proceed now |
# |
May 25th 2017, 20:15 |
inoas |
https://gist.github.com/inoas/649a921179fbd160d80c4fc2bfd70876#gistcomment-2106583 |
# |
May 25th 2017, 20:13 |
inoas |
aka I leave elements, cells, layout as it is cause I am replacing the whole layout with whatever comes from the database (cached as files) |
# |
May 25th 2017, 20:13 |
WyriHaximus |
inoas: seen your previous message but you where online when I wanted to reply |
# |
May 25th 2017, 20:13 |
inoas |
WyriHaximus: if you are reading this: I made my own SimpleTwigView which overwrides render instead of _render and has a renderTwigTemplate() which does the loadTemplate()->render() call |
# |
May 25th 2017, 19:58 |
jeremyharris |
and the entity you pass to save() — the result of patchEntity |