# |
Oct 14th 2019, 16:17 |
jotpe |
@admad Yes, i used this. I ended up building a helper with something like this: |
# |
Oct 14th 2019, 16:05 |
admad |
@jotpe `$this->request->getPath()` will return the current URL without query string args if any |
# |
Oct 14th 2019, 15:58 |
jotpe |
Thanks @tobse, @dereuromark and @admad |
# |
Oct 14th 2019, 15:52 |
admad |
a more generic solution would be generate URL for record and compare with current request's URL. Then you will be able to use the check for any record, not just companies |
# |
Oct 14th 2019, 15:50 |
dereuromark |
wrapping it inside helpers maybe :slightly_smiling_face: |
# |
Oct 14th 2019, 15:46 |
tobse |
I'm using the request object in my menu-elements. I.e. ''' if ($this->request->getParam('controller') === 'Companies' andand $this->request->getParam('pass')[0] === strtolower($company->slug)) { $active = ' active'; $current = ' <span class="sr-only">' . __x('Navigation', '(current)') . '</span>'; }''' Maybe there is a much more elegant way. :slightly_smiling_face: |
# |
Oct 14th 2019, 15:40 |
jotpe |
What's the proper way to get the current request url within a view? E.g. for set the current active link in a menu in a element? |
# |
Oct 14th 2019, 15:12 |
ricksaccous |
that's cool man, hopefully you can maintain it easily enough |
# |
Oct 14th 2019, 15:12 |
ricksaccous |
lol jk |
# |
Oct 14th 2019, 15:12 |
ricksaccous |
HERETIC LEAVE THIS CHANNEL AT ONCE |
# |
Oct 14th 2019, 15:11 |
nils |
I moved to Laravel a while back. That’s my new god. I only have one project to maintain in Cakephp :slightly_smiling_face: |
# |
Oct 14th 2019, 15:10 |
ricksaccous |
BELIEVE MY FRIEND AND YOU WILL ACHIEVE |
# |
Oct 14th 2019, 15:09 |
nils |
:) |
# |
Oct 14th 2019, 15:09 |
ricksaccous |
you gotta believe |
# |
Oct 14th 2019, 15:08 |
nils |
Not attitude problems, age problems. I started out too late. :slightly_smiling_face: |
# |
Oct 14th 2019, 15:07 |
ricksaccous |
not with that attitude |
# |
Oct 14th 2019, 15:06 |
nils |
Haha, I will never become victorious in the developer-scene. |
# |
Oct 14th 2019, 15:06 |
ricksaccous |
no pain no gain |
# |
Oct 14th 2019, 15:06 |
ricksaccous |
this is why we're here oh yeahhhhh |
# |
Oct 14th 2019, 15:06 |
ricksaccous |
@nils you're being molded by the flames into a better developer, through the flames you will rise victorious |
# |
Oct 14th 2019, 15:05 |
nils |
Yeah. A lot of the burns were simply language barriers. I mean, it’s nice to have english, PHP and CakePHP as a native language. Some people here were never beginners it seems. :slightly_smiling_face: |
# |
Oct 14th 2019, 15:05 |
admad |
yeah, if you don't have a thick skin :slightly_smiling_face: |
# |
Oct 14th 2019, 15:04 |
niel45 |
flame-retardant underwear helps |
# |
Oct 14th 2019, 15:03 |
nils |
I guess. When I started hanging out in this channel around 8 years ago I got burned each and every day. So I’m used to it. |
# |
Oct 14th 2019, 15:03 |
ricksaccous |
lol |
# |
Oct 14th 2019, 15:02 |
admad |
the burn is worth the effort of extra typing |
# |
Oct 14th 2019, 15:02 |
nils |
Yeah. Just thought there would be easier for you to type “Yes” rather than “This is not somethi…“ ;) |
# |
Oct 14th 2019, 15:00 |
ricksaccous |
ouch another harsh one, sometimes other netizens need tough love though |
# |
Oct 14th 2019, 15:00 |
neon1024 |
Maybe search Google for ‘Basic maths’ |
# |
Oct 14th 2019, 15:00 |
neon1024 |
You have all the power of The Internet at your fingertips |
# |
Oct 14th 2019, 14:59 |
neon1024 |
This is not something you need me for. |
# |
Oct 14th 2019, 14:59 |
neon1024 |
> 100 pence = 1 pound? |
# |
Oct 14th 2019, 14:59 |
ricksaccous |
just join the discord @neon1024 hangs out on, they'll help you out |
# |
Oct 14th 2019, 14:58 |
ricksaccous |
lolll |
# |
Oct 14th 2019, 14:58 |
alexdd55976 |
will do.. i am here anyway and will complain about it a lot :) |
# |
Oct 14th 2019, 14:57 |
ricksaccous |
@alexdd55976 alright good luck and let me know how it goes |
# |
Oct 14th 2019, 14:55 |
nils |
@neon1024 I see. 100 pence = 1 pound? |
# |
Oct 14th 2019, 14:55 |
alexdd55976 |
hard to tell what the best way to do it... gonna find out soon |
# |
Oct 14th 2019, 14:54 |
neon1024 |
I do everything in pencese |
# |
Oct 14th 2019, 14:54 |
alexdd55976 |
@ricksaccous thorugh selction you change some json config which triggers changes in your forms... |
# |
Oct 14th 2019, 14:54 |
nils |
So I should use the checkout amount times 100 ? |