xfra35 / f3-multilang

Create multilingual apps with this localization plugin for the PHP Fat-Free Framework
GNU General Public License v3.0
48 stars 13 forks source link

alias with params #16

Closed hroma closed 7 years ago

hroma commented 7 years ago

Hi, I've setup the following route:

GET|POST @userrequest : /profile/@action=UserControl->@action

Now, i'm trying to pass the @action param (edit) within the alias function inside my view:

<a href="{{ $ml->alias('userrequest','edit',$ml->current) }}">Edit profile</a>

The current output is:

<a href="/profile/@action">Edit profile</a>

I was expecting the result to be:

<a href="/profile/edit">Edit profile</a>

my single route with @action should handle UserControl->edit & update & cancel & emailupdate. Is the Alias/param var used for this purpose? Is it a bug? Can this param be localized (i.e French = edtion & mise-a-jour & supprimer & mise-a-jour-email? What I'm missing?

hroma commented 7 years ago

Ok... I definitely missed something. Param work as expected. For those who are looking for the same info, the answer is:

{{ $ml->alias('userrequest',array('action'=>'edit'),$ml->current) }}