# |
Jul 10th 2017, 13:01 |
inoas |
http://localhost/cakedkolibrary/books/view/3, this is my url, i want to get that "3" and send it to another controller so I can save it in my database table ... sounds like request action to me |
# |
Jul 10th 2017, 13:01 |
hmic |
he did not ask for anything you are talking about inoas |
# |
Jul 10th 2017, 13:01 |
hmic |
he asked for the information in the currently rendered template - this how he gets that. |
# |
Jul 10th 2017, 12:59 |
inoas |
cakephp3? |
# |
Jul 10th 2017, 12:58 |
inoas |
I am using it and I can only say it is the path of failure |
# |
Jul 10th 2017, 12:58 |
inoas |
you can use request action... but it is pretty bad imho |
# |
Jul 10th 2017, 12:58 |
inoas |
or create model layer logic (a class and some functions) where you pass down the request params that hmic referes to |
# |
Jul 10th 2017, 12:57 |
inoas |
you can build "the other controller" as a cell if you need rendering |
# |
Jul 10th 2017, 12:57 |
inoas |
you have one single front controller which dispatches and calls one single action in a specific controller |
# |
Jul 10th 2017, 12:56 |
inoas |
celementcrown cakephp is a push framework, not a pull framework |
# |
Jul 10th 2017, 12:56 |
inoas |
celementcrown you cannot |
# |
Jul 10th 2017, 12:54 |
hmic |
$this->request->params['pass'][0] |
# |
Jul 10th 2017, 12:51 |
clementcrown |
http://localhost/cakedkolibrary/books/view/3, this is my url, i want to get that "3" and send it to another controller so I can save it in my database table |
# |
Jul 10th 2017, 12:50 |
clementcrown |
nope, @hmic |
# |
Jul 10th 2017, 12:45 |
hmic |
so thats like /ohtercontroller/youraction/$id you would: $this-Html->link('go there', ['controller' => 'othercontroller', 'action' => 'youraction', $id]); |
# |
Jul 10th 2017, 12:43 |
clementcrown |
@hmic i want to pass the id of the current post i am viewing to another controller, i do not waant to use form for this |
# |
Jul 10th 2017, 12:38 |
hmic |
clementcrown: like /controller/action/your/data or /controller/action?your=data |
# |
Jul 10th 2017, 12:32 |
clementcrown |
Hi guys, please how can I send information or a value from cakephp view to a controller without using form ? |
# |
Jul 10th 2017, 12:15 |
Martz |
wow, It's been a while... |
# |
Jul 10th 2017, 12:01 |
makallio85 |
okay.. ill try to figure something out |
# |
Jul 10th 2017, 12:00 |
dereuromark |
write it and apply with it, we can then discuss it once there is something concrete to talk about. but sure, why not if it is useful to the community |
# |
Jul 10th 2017, 12:00 |
makallio85 |
Do you think there would be need to have this kind of template project in awesomelist? |
# |
Jul 10th 2017, 12:00 |
dereuromark |
thats what we all do with our stuff |
# |
Jul 10th 2017, 12:00 |
dereuromark |
automate whatever you need |
# |
Jul 10th 2017, 11:59 |
dereuromark |
you can write a bake generator also for that |
# |
Jul 10th 2017, 11:59 |
makallio85 |
not that big deal to do it every time, but it would save some time |
# |
Jul 10th 2017, 11:59 |
makallio85 |
I mean some project, where is "test app" emulation already built in |
# |
Jul 10th 2017, 11:58 |
dereuromark |
:slightly_smiling_face: generate it |
# |
Jul 10th 2017, 11:58 |
makallio85 |
i remember there is, but cannot find it |
# |
Jul 10th 2017, 11:58 |
inoas |
bin/cake bake plugin |
# |
Jul 10th 2017, 11:58 |
makallio85 |
Is there any skeleton template for cake3 plugins? |
# |
Jul 10th 2017, 11:57 |
inoas |
:/ |
# |
Jul 10th 2017, 11:57 |
inoas |
feels sad inside :E |
# |
Jul 10th 2017, 11:57 |
inoas |
thats should be very clean and concise and I really fear setter-hell for options |
# |
Jul 10th 2017, 11:57 |
inoas |
much like function overloading even |
# |
Jul 10th 2017, 11:57 |
inoas |
either to stop the function from executing or - if one pattern is found - to continue - if multiple patterns are found to continue via proxying to protected methods |
# |
Jul 10th 2017, 11:56 |
inoas |
so I would love to see that we support a simple php-ish way to create schemas that then can be used to pattern match for $options |
# |
Jul 10th 2017, 11:56 |
inoas |
if yes, I fully agree but the support is not there |
# |
Jul 10th 2017, 11:56 |
inoas |
like symbols? atoms? |
# |
Jul 10th 2017, 11:23 |
lorenzo |
It would be better if php adopted the idea of enums, that Hacklang has |
# |
Jul 10th 2017, 11:22 |
lorenzo |
I totally see you argument. I wouldn't like to have objects for all options, maybe only for configs |