# |
May 27th 2021, 18:42 |
kevin.pfeifer |
nope |
# |
May 27th 2021, 18:42 |
etibor |
have you ever worked with cakepdf? |
# |
May 27th 2021, 18:42 |
etibor |
thank you @kevin.pfeifer |
# |
May 27th 2021, 18:42 |
kevin.pfeifer |
but I could be wrong and there is some way to do what you want |
# |
May 27th 2021, 18:42 |
etibor |
yes simple often faster solution :) |
# |
May 27th 2021, 18:41 |
slackebot |
.htaccess redirect from `/review/*` to `/clark/*` |
# |
May 27th 2021, 18:41 |
kevin.pfeifer |
well prefixes are basically meant to have the connected controller logic to be present in a Sub-Namespaces inside Controllers. So if you already have a `clerk` prefix your controller for those routes live in the folder `src/Controller/clerk` and therefore live in another namespace (as well as the connected template files) I haven’t dealt with routes that often till now but I guess you would be faster to just put an |
# |
May 27th 2021, 18:29 |
etibor |
yes that would be the case |
# |
May 27th 2021, 18:29 |
etibor |
hello @kevin.pfeifer |
# |
May 27th 2021, 12:45 |
kevin.pfeifer |
ah i mean `/review/somecontroller/someaction` as well as `/clerk/somecontroller/someaction` |
# |
May 27th 2021, 12:36 |
kevin.pfeifer |
so you want to have the same result with either `/review/someaction` as well as `/clerk/someaction` |
# |
May 27th 2021, 12:17 |
etibor |
does not seems its enough |
# |
May 27th 2021, 12:17 |
etibor |
`$routes->connect('/review/*', ['prefix'=>'clerk']);` |
# |
May 27th 2021, 12:16 |
etibor |
i would like to redirect one prefix to another prefix(with all actions and views) |
# |
May 27th 2021, 12:16 |
etibor |
hello everyone |
# |
May 26th 2021, 22:12 |
tyler.adam.lazenby |
I finally figured it out, there is a nesting label template |
# |
May 26th 2021, 22:10 |
etibor |
its not avery good solution since i can not use those values in the Paginate |
# |
May 26th 2021, 22:10 |
etibor |
Kevin,ndm thank you for your help, i implemented in not a smooth way, i made a pre query to determine if it is a clerk or a secreter than made the second query , and attached to the main query in the index controller by using $results->map |
# |
May 26th 2021, 22:01 |
tyler.adam.lazenby |
how can I change that |
# |
May 26th 2021, 21:59 |
tyler.adam.lazenby |
Boo is just so I can easily inpect it |
# |
May 26th 2021, 21:59 |
tyler.adam.lazenby |
```// label specific for radio 'radiolabel' => '<label class="form-check-label" {{attrs}}>{{text}}</label>', // Wrapping container for radio input/label, 'radioWrapper' => '<div class="form-check form-check-radio">Boo {{radiolabel}}</div>',``` |
# |
May 26th 2021, 21:59 |
tyler.adam.lazenby |
this is what i am trying right now in my custom FormHelper class |
# |
May 26th 2021, 21:59 |
tyler.adam.lazenby |
I can't get radio buttons to form properly with my theme. I need to have the label have a certain class and for the radio group to be contained inside a div with another class |
# |
May 26th 2021, 21:52 |
ndm |
I'm just not sure if there's still a question pending :upside_down_face: |
# |
May 26th 2021, 21:51 |
kevin.pfeifer |
someone is curious about the resolution :) |
# |
May 26th 2021, 21:50 |
ndm |
Soooo... what issue did you find? |
# |
May 26th 2021, 21:42 |
etibor |
where i can not attach to the query |
# |
May 26th 2021, 21:42 |
etibor |
the real issue is by the index page |
# |
May 26th 2021, 21:42 |
etibor |
its not a big deal when i need to do it in a view page, i simple make a pre query, and depends on the result make the second |
# |
May 26th 2021, 21:41 |
etibor |
okey i may see the issue |
# |
May 26th 2021, 21:37 |
etibor |
moment i am going to look for the sql query |
# |
May 26th 2021, 21:37 |
kevin.pfeifer |
like ndm said, checking the generated SQL is the first easy thing you can do to see what cakephp does with your connections Otherwise trying to first come up with the pure SQL also helps because we can then try to help you convert that to how that query should be written in cakephp |
# |
May 26th 2021, 21:35 |
ndm |
I mean... you can never have both for one review record then, because `class` can only be one of the two values. Is that what you expect? The default join type should be `LEFT`, but if you end up with an `INNER`, you'd never receive anything. So I'd again point to inspecting the queries. |
# |
May 26th 2021, 21:35 |
etibor |
when the db field 'class' is internal (in Reviews) its means Clerks |
# |
May 26th 2021, 21:34 |
etibor |
when the db field class is external(in Reviews) its means Secreters |
# |
May 26th 2021, 21:33 |
etibor |
thank you @kevin.pfeifer your hint |
# |
May 26th 2021, 21:32 |
etibor |
its a polymorphic association and point to 2 different models(Secreters and Clerks) |
# |
May 26th 2021, 21:31 |
ndm |
So, a polymorphic self-association? |
# |
May 26th 2021, 21:30 |
etibor |
thank you @ndm i am not sure, because it was from the ReviewsTable.php file |
# |
May 26th 2021, 21:28 |
ndm |
In any case, use debug kit to inspect the generated queries, that might give some clue. |
# |
May 26th 2021, 21:26 |
ndm |
Shouldn't the class name for both associations be `Reviews`? |