# |
Dec 15th 2017, 16:51 |
rafael.junqueira.sant |
yes, separate div containers, that's all I want. |
# |
Dec 15th 2017, 16:51 |
dereuromark |
separate div containers, not completely separate |
# |
Dec 15th 2017, 16:51 |
rafael.junqueira.sant |
"// In your View: Will use great_success.ctp instead of succcess.ctp <?= $this->Flash->render('flash', [ 'element' => 'great_success' ]);" |
# |
Dec 15th 2017, 16:51 |
dereuromark |
that is all the core provides. all working exactly like this. |
# |
Dec 15th 2017, 16:50 |
rafael.junqueira.sant |
This is what the documentation says: |
# |
Dec 15th 2017, 16:50 |
rafael.junqueira.sant |
but it is not done automatically, there is something that must be done. |
# |
Dec 15th 2017, 16:50 |
rafael.junqueira.sant |
so, it is done so to render the messages in the Flash/success.ctp and Flash/error.ctp, separately |
# |
Dec 15th 2017, 16:49 |
rafael.junqueira.sant |
good, as I saw in the Flash component class, it sets 'success' and 'error' to the 'element' option in Flash with a magic method |
# |
Dec 15th 2017, 16:48 |
rafael.junqueira.sant |
by default, when I use bake, it creates controllers that sets flash messages with $this->Flash->success(__('The example has been saved.')), and $this->Flash->error(__('The example could not be saved. Please, try again.')) |
# |
Dec 15th 2017, 16:46 |
rafael.junqueira.sant |
let's try to understand this, look |
# |
Dec 15th 2017, 16:46 |
rafael.junqueira.sant |
yes |
# |
Dec 15th 2017, 16:46 |
dereuromark |
I dont understand |
# |
Dec 15th 2017, 16:46 |
rafael.junqueira.sant |
Please, just ty to understand my point: how to render Flash->success and ...->error in the elements? |
# |
Dec 15th 2017, 16:45 |
rafael.junqueira.sant |
I consider the possibility that I am missing something, but what am I missing? |
# |
Dec 15th 2017, 16:45 |
dereuromark |
Then build your own Flash helper at least :slightly_smiling_face: |
# |
Dec 15th 2017, 16:45 |
rafael.junqueira.sant |
I know I could use the plugin, but since it gives me $this->Flash->success and ...->error and elements by default, why should I use a plugin for this situation? |
# |
Dec 15th 2017, 16:44 |
dereuromark |
no value in creating tickets with a question here. |
# |
Dec 15th 2017, 16:44 |
dereuromark |
otherwise you need to figure out a core improvement as pull request and submit that. |
# |
Dec 15th 2017, 16:44 |
rafael.junqueira.sant |
"// In your View: Will use great_success.ctp instead of succcess.ctp <?= $this->Flash->render('flash', [ 'element' => 'great_success' ]);" |
# |
Dec 15th 2017, 16:44 |
dereuromark |
you could have saved yourself a lot of time by just using the plugin if you need them in diferent places or orders. |
# |
Dec 15th 2017, 16:43 |
rafael.junqueira.sant |
But how to print them in separate elements? How to use the elements? |
# |
Dec 15th 2017, 16:43 |
rafael.junqueira.sant |
Yes, it uses separate elements. |
# |
Dec 15th 2017, 16:43 |
dereuromark |
and also: styling is already different out of the box, as it uses separate elements |
# |
Dec 15th 2017, 16:43 |
dereuromark |
Depends on the structure of your session content, If it would be nested differently, you could probalby do what you want. |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
and still, I had to Jerry Rig it to make it work appropriately |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
I did |
# |
Dec 15th 2017, 16:42 |
dereuromark |
Sry if I confused you, my point was: check the code and find out. |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
Alright, this is the documentation page: https://book.cakephp.org/3.0/en/views/helpers/flash.html |
# |
Dec 15th 2017, 16:42 |
rafael.junqueira.sant |
Pretty obvious, right? Why would I need to use it I didn't want to display them in different ways? |
# |
Dec 15th 2017, 16:41 |
rafael.junqueira.sant |
For me it is simple: I use Flash->success and Flash->error so I can separate both to display them in different places and styles. |
# |
Dec 15th 2017, 16:40 |
rafael.junqueira.sant |
Can someone try to understand what's going on with $this->Flash->success? |
# |
Dec 15th 2017, 16:40 |
rafael.junqueira.sant |
Look, I need someone to give me a little bit of focused attention here, because there is something that is becoming obvious for me and for others, for some reason, it seems obvious in other way. |
# |
Dec 15th 2017, 16:28 |
inoas |
gnite |
# |
Dec 15th 2017, 16:28 |
inoas |
admad let me know if I really need to fix something @ cakephp/authentication - I want the PR to be done or rejected so that my mind clears ;-) |
# |
Dec 15th 2017, 16:22 |
aro |
i couldnt get ['rand()'] to work, so i just used shuffle on the collection |
# |
Dec 15th 2017, 16:15 |
neon1024 |
Sure it is aro, probably `->order(['RAND(field')])` |
# |
Dec 15th 2017, 16:03 |
hmic |
ask google! |
# |
Dec 15th 2017, 16:03 |
hmic |
you dont want to do that |
# |
Dec 15th 2017, 16:03 |
aro |
is it possible in cake3 to order by rand() |
# |
Dec 15th 2017, 15:49 |
obinoob |
I've noticed that Router::parse is deprecated in cakephp 3.5 cakephp documentation points that parseRequest should be used instead! However, it only accept requests, so now this code gets invalid, is there another new way of parsing a referer? $referer_params = Router::parse($this->referer('/', true)); |
# |
Dec 15th 2017, 15:42 |
neon1024 |
https://book.cakephp.org/3.0/en/core-libraries/events.html#getting-event-data-as-function-parameters |