# |
Apr 27th 2021, 15:19 |
paolo.bragagni |
In 4 They have reintroduced it? (In 3 there was not ) |
# |
Apr 27th 2021, 15:17 |
paolo.bragagni |
Thanks I ll try all of them, but probably i ll build my own helper.. |
# |
Apr 27th 2021, 15:07 |
slackebot |
specified plugin like the bootstrap helper one. |
# |
Apr 27th 2021, 15:07 |
ndm |
> Better, no, it just more "complete" because it support form too As the creator of it, I have to insist on that being a vast understatement :P Generally `icings/menu` generic menu plugin, it isn't limited to BS navbars, it can create all sorts of HTML structures. @paolo.bragagni If you don't need that freedom, and none of the other features that it provides, but just a BS4 navbar, then you're most likely better of with a more |
# |
Apr 27th 2021, 15:04 |
dereuromark |
Yes, in the table classes directly. |
# |
Apr 27th 2021, 14:47 |
paolo.bragagni |
there's a way to prefix the database (as it was in cakephp 2 ?) |
# |
Apr 27th 2021, 13:12 |
etibor |
why does full locale name does not works?only the 2 digits |
# |
Apr 27th 2021, 12:18 |
etibor |
why does this iso code does not works |
# |
Apr 27th 2021, 11:06 |
erwane |
Better,n |
# |
Apr 27th 2021, 11:06 |
etibor |
if i try this: I18n::setLocale('en_US'); it does not work for translation behavior I18n::setLocale('en'); this will work but the whole site already using 'en_US' form |
# |
Apr 27th 2021, 09:35 |
paolo.bragagni |
(In my old cake 2 I've built an helper for bootstrap 2 menu) |
# |
Apr 27th 2021, 09:34 |
paolo.bragagni |
In your opinion is better to use this https://github.com/Holt59/cakephp4-bootstrap-helpers ? |
# |
Apr 27th 2021, 09:34 |
paolo.bragagni |
@erwane I've installed this https://github.com/icings/menu |
# |
Apr 27th 2021, 09:27 |
erwane |
@paolo.bragagni check https://github.com/Holt59/cakephp4-bootstrap-helpers and doc : https://holt59.github.io/cakephp3-bootstrap-helpers/navbar-helper/basics/ |
# |
Apr 27th 2021, 09:12 |
etibor |
its not really good because the whole site is using the 5 characters schema |
# |
Apr 27th 2021, 09:11 |
etibor |
i have a minor issue with translation behaviour, saving the translated fields working good but when i try to display the field when the local is 5 character long like en_US it does not work, only when the local is 2 characters long 'en' display the desired fields |
# |
Apr 27th 2021, 09:09 |
etibor |
hello evryone |
# |
Apr 27th 2021, 08:19 |
paolo.bragagni |
icings template menu with bootstrap 4 and nested submenus are available somewhere? |
# |
Apr 27th 2021, 08:18 |
paolo.bragagni |
hi all. |
# |
Apr 27th 2021, 02:48 |
slackebot |
SecurityException $exception = null) { if ($exception instanceof SecurityException andand $exception->getType() === 'secure') { return $this->redirect('https://' . env('SERVER_NAME') . Router::url($this->request->getRequestTarget())); } throw $exception; }``` If anyone could point me in the right direction, I'd greatly appreciate it. |
# |
Apr 27th 2021, 02:48 |
francisdoydora |
Good day everyone, I'm trying to figure out what's wrong with my force HTTPS redirect. The URL after successfully logging in redirects me to https://local.juniorhigh/login?redirect=%2Fadmin-panels%2Fdashboard instead of https://local.juniorhigh/admin-panels/dashboard I've created this function in AppController.php as prescribed in the documentation for CakePhp 3.8 ```public function forceSSL($error = '', |
# |
Apr 26th 2021, 23:14 |
D-rex |
I am trying to set a custom repsonse code. when inspecting the dev tools in chrome I can see the url is marked with the custom code 503 but when I use the getStatusCode() method or php built-in http_response_code() I get a 200. |
# |
Apr 26th 2021, 21:41 |
greg138 |
Looks eminently reasonable. |
# |
Apr 26th 2021, 21:38 |
slackebot |
strtolower(preg_replace( '/[^A-Za-z0-9_-]/', '', $tmp )); }``` |
# |
Apr 26th 2021, 21:38 |
kevin.pfeifer |
basically i blatenly copied parts of wordpresses `sanitize_html_class()` function and just created a little helper function like that ``` function clean_dom_class_string($string) { // Stolen from wordpress sanitize_html_class() function // Strip out any % encoded octets $tmp = preg_replace( '|%[a-fA-F0-9][a-fA-F0-9]|', '', $string ); // Limit to A-Z, a-z, 0-9, '_', '-'. return |
# |
Apr 26th 2021, 21:24 |
greg138 |
I'm not sure `h` is what you want in there. Is `<p class="a<b">` a useful thing to use, for example? Maybe a simple replace of things like `<`, `>` and `and` with underscores would be better? |
# |
Apr 26th 2021, 21:06 |
sebastiansperandio093 |
Thanks @kevin.pfeifer |
# |
Apr 26th 2021, 20:11 |
kevin.pfeifer |
i guess h() it is :) |
# |
Apr 26th 2021, 20:10 |
kevin.pfeifer |
yop |
# |
Apr 26th 2021, 20:09 |
greg138 |
Oh wait, in classes? Like `<p class="blah">`? |
# |
Apr 26th 2021, 20:08 |
greg138 |
`h()`? |
# |
Apr 26th 2021, 19:40 |
kevin.pfeifer |
or should i just write my own :) |
# |
Apr 26th 2021, 19:40 |
kevin.pfeifer |
is there a “built in” View Helper which lets me sanitize strings to be used in HTML classes? |
# |
Apr 26th 2021, 16:33 |
ndm |
After 8 rounds of voting It would probably look like `<(![ProgressHelper]!)>$io->helper('Progress')` :troll: |
# |
Apr 26th 2021, 16:32 |
ndm |
Maybe in a few years we get language level typecasts. |
# |
Apr 26th 2021, 16:31 |
ndm |
Well, the base class certainly doesn't satisfy that type, so that's where an inline hint would be required, being it an ignore, or a type hint. Not sure if PhpStan maybe has a tag for typehinting method return values by now. |
# |
Apr 26th 2021, 16:29 |
neon1024 |
Nevermind, thanks for looking :) |
# |
Apr 26th 2021, 16:28 |
neon1024 |
The load method inside returns mixed too, so unsure |
# |
Apr 26th 2021, 16:27 |
neon1024 |
I thought it allowed child classes, but I guess I was wrong |
# |
Apr 26th 2021, 16:26 |
neon1024 |
I can add a line ignore, it’s only a utility :) |
# |
Apr 26th 2021, 16:26 |
neon1024 |
Unfortunately it’s a catch 22 |