Log message #4032457

# At Username Text
# 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
# May 25th 2017, 19:58 jeremyharris can you gist the actual newEntity / patching process
# May 25th 2017, 19:58 meder_ this is before
# May 25th 2017, 19:58 jeremyharris ok, is this the entity before or after it is patched?
# May 25th 2017, 19:58 meder_ array merge perhaps
# May 25th 2017, 19:57 meder_ jeremyharris: yeah i wasn't setting it in the entity itself, attachments field. just manually override it? what about appending incase it exists?
# May 25th 2017, 19:57 jeremyharris and then your change wouldn’t have to go into trying a full path, since it’s what would be suggested :slightly_smiling_face:
# May 25th 2017, 19:57 meder_ https://gist.github.com/anonymous/0f5a0c3467764f4bd14fb84ea30fe149