# |
May 27th 2016, 10:41 |
elboletaire |
Ok, let me explain that better... is more comfortable when you have a huge page which continuously changes its template. The more versatile way I've currently found to do it is dinamically loading content in elements, so I can create templates every time the client asks me for a new fraking design |
# |
May 27th 2016, 10:41 |
bernat1 |
Of course you can do things the way you want, but cakephp was created in a different mindset I guess. |
# |
May 27th 2016, 10:40 |
bernat1 |
I think the moment you said you're comfortable loading models in the view everyone fell off their chair. :) |
# |
May 27th 2016, 10:36 |
elboletaire |
Or, the same question but asked different... why are view cells NOT reusing the main View instance? |
# |
May 27th 2016, 10:34 |
elboletaire |
Then... the question would be.. what's the sense of using View Cells? It's much versatile using an element and load inside the `TableRegistry` (which breaks the MVC pattern, I know... but it's much more comfortable) |
# |
May 27th 2016, 10:33 |
elboletaire |
> A new View instance is used to render each cell and these new objects do not share context with the main template / layout. Each cell is self-contained and only has access to variables passed as arguments to the View::cell() call. |
# |
May 27th 2016, 10:33 |
elboletaire |
Ok, I've found it... |
# |
May 27th 2016, 10:32 |
elboletaire |
The only way I've found is passing `$this` to the view cell as another variable (`$template` in my case). But I don't get why view blocks do not work by default... :S |
# |
May 27th 2016, 10:31 |
elboletaire |
Why view blocks do not work inside view cells? |
# |
May 27th 2016, 10:18 |
veganista |
Anyway of automatically getting flash message serialised when requesting json? |
# |
May 27th 2016, 10:09 |
ionas |
shouldnâ??t it filter everything? |
# |
May 27th 2016, 10:07 |
spriz |
Hmm, is it correctly understood that thereâ??s no default support for bulk edit with just PUTâ??ing an array rather than one json object with CRUD? |
# |
May 27th 2016, 10:02 |
Neon1024x |
Worth reading the Phinx docs too imho |
# |
May 27th 2016, 09:59 |
bernat1 |
oh, I was looking at the bake pages. |
# |
May 27th 2016, 09:59 |
TheMiller |
I think working with migration-diffs is the most easiest way |
# |
May 27th 2016, 09:58 |
TheMiller |
http://book.cakephp.org/3.0/en/migrations.html#generating-a-diff-between-two-database-states |
# |
May 27th 2016, 09:58 |
TheMiller |
The in the cookbook |
# |
May 27th 2016, 09:58 |
bernat1 |
is there any docs to baking migrations, I didn't even knew that existed. |
# |
May 27th 2016, 09:58 |
TheMiller |
Thanks@all! |
# |
May 27th 2016, 09:57 |
Neon1024x |
D |
# |
May 27th 2016, 09:57 |
TheMiller |
That was the Problem. Wow, everything has been created. |
# |
May 27th 2016, 09:57 |
TheMiller |
bin/cake bake migration My-Migration |
# |
May 27th 2016, 09:57 |
TheMiller |
ah stop. sry, my fault |
# |
May 27th 2016, 09:57 |
Neon1024x |
bin/cake bake migration MyMigration |
# |
May 27th 2016, 09:57 |
Neon1024x |
So you're running something like |
# |
May 27th 2016, 09:57 |
TheMiller |
Which classname? |
# |
May 27th 2016, 09:56 |
TheMiller |
ok that solved the problem, but now diff says: Your migrations history is empty and you do not have any migrations files. Falling back to baking a snapshot... Error: The className is not correct. The className can only contain "A-Z" and "0-9". |
# |
May 27th 2016, 09:56 |
Neon1024x |
Perhaps its just that you have migrations listed in your phinxlog table which don't exist in config/Migrations |
# |
May 27th 2016, 09:55 |
Neon1024x |
You don't need a migration snapshot, but it's handy if you want to recreate the whole db schema |
# |
May 27th 2016, 09:55 |
TheMiller |
yes sorry ;) |
# |
May 27th 2016, 09:55 |
hmic |
truncate, yes. |
# |
May 27th 2016, 09:54 |
TheMiller |
may I flush the phinx-tables? |
# |
May 27th 2016, 09:54 |
Neon1024x |
Odd, I've never seen that error before |
# |
May 27th 2016, 09:54 |
fquffio |
Oh, then you must `bin/cake bake migration_snapshot initial` first. :slightly_smiling_face: |
# |
May 27th 2016, 09:54 |
TheMiller |
yes. |
# |
May 27th 2016, 09:54 |
bernat1 |
hmmm |
# |
May 27th 2016, 09:54 |
Neon1024x |
Using bin/cake bake migration right? |
# |
May 27th 2016, 09:54 |
bernat1 |
how do you make a diff? |
# |
May 27th 2016, 09:54 |
TheMiller |
There are no available migrations. Try creating one using the create command. |
# |
May 27th 2016, 09:53 |
TheMiller |
Thanks @all so far. migrations status says - nothing to do |
# |
May 27th 2016, 09:53 |
Neon1024x |
TheMiller, You might want to bake a migration snapshot, or try bin/cake migrations status |